Topic: optional decl-specifier-seq in simple-declaration


Author: Andy Larson <nosralar@yahoo.com>
Date: Tue, 7 Aug 2001 10:45:38 GMT
Raw View
The definition of a simple-declaration in the IS shows the decl-
specifier-seq part as optional.  Para. 7/7 states that only in function
declarations for constructors, destructors, and type conversions can the
decl-specifier-seq be omitted.  However, none of these operations can be
done as part of a simple-declaration, only as part of a member-
declaration (para 9.2).  It seems to me that the decl-specifier-seq is
not optional in a simple-declaration, but is always required.

Andy

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]





Author: "James Russell Kuyper Jr." <kuyper@wizard.net>
Date: Tue, 7 Aug 2001 16:09:57 GMT
Raw View
Andy Larson wrote:
>
> The definition of a simple-declaration in the IS shows the decl-
> specifier-seq part as optional.  Para. 7/7 states that only in function
> declarations for constructors, destructors, and type conversions can the
> decl-specifier-seq be omitted.  However, none of these operations can be
> done as part of a simple-declaration, only as part of a member-
> declaration (para 9.2).  It seems to me that the decl-specifier-seq is
> not optional in a simple-declaration, but is always required.

One kind of member-declaration is a template-declaration, which is
defined in terms of a declaration (14p1), which can be a
simple-declaration. Constructors and type conversions can both be
templated.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]