Name

declaration — Function, namespace, object, type, template declaration

Synopsis

               translation-unit ::= [declaration-seq]
declaration-seq ::= declaration | declaration-seq 
               declaration
               declaration ::= block-decl | function-decl | template-decl | explicit-instantiation |
    explicit-specialization | linkage-specification | namespace-defn
               block-decl ::= simple-decl | asm-defn | namespace-alias-defn | using-decl | 
    using-directive
               simple-decl ::= [decl-specifier-seq] [init-declarator-list] ;
decl-specifier ::= storage-class-specifier | type-specifier | function-specifier | 
    friend | typedef
decl-specifier-seq ::= decl-specifier | decl-specifier-seq 
               decl-specifier
               storage-class-specifier ::= auto | register | static | extern | mutable
function-specifier ::= inline | virtual | explicit

A source file is a sequence of zero or more declarations. See Chapter 2 for a full discussion of declarations.

See Also

asm, declarator, function, namespace, template, type, typedef, using, Chapter 2

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.