GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — cpp-patterns/argument-count at master · hmenke/cpp-patterns

Expand file tree

/

argument-count

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

argument-count

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
CMakeLists.txt
CMakeLists.txt
 
 
README.md
README.md
 
 
test.cpp
test.cpp
 
 

README.md

Outline

Argument Counting

Problem

Under certain circumstances it might be necessary to count how many arguments a function is taking. In my specific use case I wanted to infer the dimensionality of an integral from the function signature. That is to say, a funtion with the signature

double f(double x, double y, double z);

should most probably be integrated over three-dimensional space.

Solution

We use nifty partial spezializations of a templated struct for the various types of signatures. The example is incomplete in the sense that not all combinations of const and volatile qualifiers are exhausted.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.