[dcl.type.simple] (original) (raw)

9 Declarations [dcl]

9.2 Specifiers [dcl.spec]

9.2.9 Type specifiers [dcl.type]

9.2.9.3 Simple type specifiers [dcl.type.simple]

The simple type specifiers are

The component name of a type-name is the first name in it.

A deducible template is either a class template or is an alias template whose defining-type-id is of the form

[Note 1:

An injected-class-name is never interpreted as a template-namein contexts where class template argument deduction would be performed ([temp.local]).

— _end note_]

The othersimple-type-specifier_s_specify either a previously-declared type, a type determined from an expression, or one of the fundamental types ([basic.fundamental]).

Table 17 summarizes the valid combinations ofsimple-type-specifier_s_and the types they specify.

Table 17simple-type-specifiers and the types they specify [tab:dcl.type.simple]

🔗Specifier(s) Type
🔗type-name the type named
🔗simple-template-id the type as defined in [temp.names]
🔗decltype-specifier the type as defined in [dcl.type.decltype]
🔗pack-index-specifier the type as defined in [dcl.type.pack.index]
🔗placeholder-type-specifier the type as defined in [dcl.spec.auto]
🔗template-name the type as defined in [dcl.type.class.deduct]
🔗char “char”
🔗unsigned char “unsigned char”
🔗signed char “signed char”
🔗char8_t “char8_t”
🔗char16_t “char16_t”
🔗char32_t “char32_t”
🔗bool “bool”
🔗unsigned “unsigned int”
🔗unsigned int “unsigned int”
🔗signed “int”
🔗signed int “int”
🔗int “int”
🔗unsigned short int “unsigned short int”
🔗unsigned short “unsigned short int”
🔗unsigned long int “unsigned long int”
🔗unsigned long “unsigned long int”
🔗unsigned long long int “unsigned long long int”
🔗unsigned long long “unsigned long long int”
🔗signed long int “long int”
🔗signed long “long int”
🔗signed long long int “long long int”
🔗signed long long “long long int”
🔗long long int “long long int”
🔗long long “long long int”
🔗long int “long int”
🔗long “long int”
🔗signed short int “short int”
🔗signed short “short int”
🔗short int “short int”
🔗short “short int”
🔗wchar_t “wchar_t”
🔗float “float”
🔗double “double”
🔗long double “long double”
🔗void “void”

When multiple simple-type-specifiers are allowed, they can be freely intermixed with other decl-specifiers in any order.

[Note 2:

It is implementation-defined whether objects of char type are represented as signed or unsigned quantities.

The signed specifier forces char objects to be signed; it is redundant in other contexts.

— _end note_]