Function declarators

Function declarators consist of the following elements:
  • An identifier, or name
  • Parameter declarations, which specify the parameters that can be passed to the function in a function call.
  • C++ onlyException declarations, which include throw expressions; exception specifications are described in Exception handling (C++ only).C++ only
  • C++ onlyA cv_qualifier_seq, which represents one or a combination of const and volatile, and can be used only in class member functions. For the details of constant and volatile member functions, see Constant and volatile member functions (C++ only).C++ only
Read syntax diagramSkip visual syntax diagram
Function declarator syntax (C only)

>>-identifier--(--+-----------------------+--)-----------------><
                  '-parameter_declaration-'      

Read syntax diagramSkip visual syntax diagram
Function declarator syntax (C++ only)

>>-identifier--(--+-----------------------+--)------------------>
                  '-parameter_declaration-'      

>--+------------------+--+-----------------------+-------------><
   '-cv_qualifier_seq-'  '-exception_declaration-'   

Note: More complex types might be formed by using the syntax of direct_declarator in place of identifier. For the details of direct_declarator, see Overview of declarators.