Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table 9 is missing decltype(auto) #436

Closed
zygoloid opened this issue Jan 27, 2015 · 1 comment
Closed

Table 9 is missing decltype(auto) #436

zygoloid opened this issue Jan 27, 2015 · 1 comment

Comments

@zygoloid
Copy link
Member

Table 9 ("simple-type-specifiers and the types they specify") describes how simple-type-specifiers are mapped into types, but it is missing an entry for decltype(auto). Presumably this should say something like "placeholder for the type of the initializer (7.1.6.4)".

We also have a conflict between 7.1.6.2/2 and 7.1.6.4/1. The former says that only auto is "a placeholder for a type to be deduced", whereas the latter says that both "are used to designate a placeholder type that will be replaced later by deduction from an initializer". decltype(auto) does not perform deduction, so this seems wrong.

One possible, but broader, change:

  1. Change 7.1.6.2/4 to define "the declared type of an expression e" instead of "the type denoted by decltype(e)".
  2. Change Table 9 to specify that decltype(e) gives "the declared type of e".
  3. Extend Table 9 to specify that decltype(auto) gives "the declared type of the initializer, as described in 7.1.6.4".
  4. Fix up 7.1.6.4 to match.
@jensmaurer
Copy link
Member

We're consistently using "deduced" for decltype(auto), e.g. 7.1.7.4.1p5. All that's really missing is an entry in the table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants