N
newmans
Perhaps one of the experts can straighten me out on this point...
In Bjarne Stroustrup's book 'The C++ Programming Language' 3rd Edition,
section 4.9, indicates that
typedef complex<short> Point;
is not only a declaration, but also a definition.
The ISO/IEC 14882:2003(E) standard states in section 3.1 clause 2 that
"A declaration is a definition unless it declares a function without
specifying the function's body (8.4),
it contains the extern specifier (7.1.1) or a linkage-specification24) (7.5)
and neither an initializer nor a function-body,
it declares a static data member in a class declaration(9.4),
it is a class name declaration (9.1),
or it is a typedef declaration (7.1.3),
a using-declaration (7.3.3),
or a using-directive (7.3.4)".
So my question is , based on the (7.3.3) line of the clause, why is the
typedef
above a definition?
Newman
In Bjarne Stroustrup's book 'The C++ Programming Language' 3rd Edition,
section 4.9, indicates that
typedef complex<short> Point;
is not only a declaration, but also a definition.
The ISO/IEC 14882:2003(E) standard states in section 3.1 clause 2 that
"A declaration is a definition unless it declares a function without
specifying the function's body (8.4),
it contains the extern specifier (7.1.1) or a linkage-specification24) (7.5)
and neither an initializer nor a function-body,
it declares a static data member in a class declaration(9.4),
it is a class name declaration (9.1),
or it is a typedef declaration (7.1.3),
a using-declaration (7.3.3),
or a using-directive (7.3.4)".
So my question is , based on the (7.3.3) line of the clause, why is the
typedef
above a definition?
Newman