Is 7.1.7, paragraph 2 defective?

72 views
Skip to first unread message

Il-seob Bae

unread,
Oct 10, 2016, 1:47:15 PM10/10/16
to ISO C++ Standard - Discussion

I had posted this same question few days ago, but I deleted it because no one seemed to reply. It repeatedly comes up to my minds, so I'm now posting it again.

The question is simple—whether type-specifier-seq can produce(=include) defining-type-specifier. 7.1.7 [dcl.type], paragraph 2 suggests

As a general rule, at most one defining-type-specifier is allowed in the complete decl-specifier-seq of a declaration or in a type-specifier-seq or defining-type-specifier-seq.

I'm a bit skeptical because I see no syntactic rule which allows that :(

Am I missing something?

Richard Smith

unread,
Oct 10, 2016, 2:14:29 PM10/10/16
to std-dis...@isocpp.org
I think this rule is poorly-phrased. As you note, there can be no defining-type-specifier in a type-specifier-seq. However, a type-specifier-seq can contain a type-specifier, and a type-specifier is a kind of defining-type-specifier, so the intent is that this rule applies to that case as well.

Il-seob Bae

unread,
Oct 11, 2016, 11:53:57 AM10/11/16
to ISO C++ Standard - Discussion
Thank you very much !!
Reply all
Reply to author
Forward
0 new messages