|
|
void( bool, double* ) noexcept
::A::foo( bool, double* )
The declaration int power(int base, int n); just before main says that power is a function that expects two int arguments and returns an int . This declaration, which is called a function prototype ... - (K&R, Chapter 1) |
There are two styles in which functions may be declared. In the new style, the types of parameters are explicit and are part of the type of the function; such a declaration is also called a function prototype. - (K&R, Appendix A) |
Function prototype scope In a function declaration, or in any function declarator except the declarator of a function definition , names of parameters (if supplied) have function prototype scope, which terminates at the end of the nearest enclosing function declarator. - IS |
Complete and consistent use of function declarations (function prototypes) is generally recommended for C. Where that sensible advice is followed, and especially where C compilers provide options to enforce it, C code conforms to the C++ rule. - Stroustrup, TC++PL (fourth edition) |
signature <function> name, parameter type list, and enclosing namespace (if any) [Note: Signatures are used as a basis for name mangling and linking.—end note ] - IS |
There are two styles in which functions may be declared. In the new style, the types of parameters are explicit and are part of the type of the function; such a declaration is also called a function prototype. - (K&R, Appendix A) |