The reason I'm asking this is because, notwithstanding the fact that the title for Table 11 is simple-type-specifiers and the types they specify, the grammar production simple-type-specifier doesn't mention this combination of types, as a simple-type-specifier. So is unsigned int a simple-type-specifier?
Edit: I don't think the answer given to the aforementioned question is correct. If that was true, one would not be able to say that the declaration . void* operator new(std::size_t); is a declaration as defined in [dcl.dcl]/1, as size_t is typedef defined (in my system) as unsigned int. To show this assertion, i.e., that void* operator new(std::size_t); is a declaration, I almost sure we need the fact that an unsigned int is a simple-type-specifier.I was wrong. There is no problem in saying that . I think I was right the first time, except for the wrong example. That is, I believe that void* operator new(std::size_t); is a declaration, if we use the definition of type-name given in [dcl.type.simple]/1unsigned int has to be a simple-type-specifier, otherwise one would not be able to say that void f(unsigned int); is a declaration.
.
No, unsigned int is not a simple-type-specifier. If you read the preceding paragraph you have
Table 11 summarizes the valid combinations of simple-type-specifiers and the types they specify.
emphasis mine
So, while both unsigned and int are listed in paragraph 1 as simple-type-specifiers the combination of the two is not, but it is a valid type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With