ISO Definition
References are defined by the ISO C++ standard as follows (excluding the example section):
In a declaration T D where D has the form & D1and the type of the identifier in the declaration T D1 is “derived-declarator-type-list T,” then the type of the identifier of D is “derived-declarator-type-list reference to T.” Cv-qualified references are ill-formed except when the cv-qualifiers (const and volatile) are introduced through the use of a typedef (7.1.3) or of a template type argument (14.3), in which case the cv-qualifiers are ignored. [Example: in
the type of aref is “reference to int”, not “const reference to int”. ] A declarator that specifies the type “reference to cv void” is ill-formed.
It is unspecified whether or not a reference requires storage (3.7).
There shall be no references to references, no arrays of references, and no pointers to references. The declaration of a reference shall contain an initializer (8.5.3) except when the declaration contains an explicitextern specifier (7.1.1), is a class member (9.2) declaration within a class declaration, or is the declaration of a parameter or a return type (8.3.5); see 3.1. A reference shall be initialized to refer to a valid object or function.
—ISO/IEC 14882:1998(E), the ISO C++ standard, in section 8.3.2Read more about this topic: Reference (C++)
Famous quotes containing the word definition:
“No man, not even a doctor, ever gives any other definition of what a nurse should be than thisdevoted and obedient. This definition would do just as well for a porter. It might even do for a horse. It would not do for a policeman.”
—Florence Nightingale (18201910)