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

Doesn't show const qualification when using decltype #337

Closed
Waqar144 opened this issue Aug 12, 2020 · 1 comment
Closed

Doesn't show const qualification when using decltype #337

Waqar144 opened this issue Aug 12, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@Waqar144
Copy link

Waqar144 commented Aug 12, 2020

The following snippet:

int main()
{
  const int x = 20;
  decltype(x) y = 30;
}

Expands to:

int main()
{
  const int x = 20;
  int y = 30;  // should be : const int y
}

Where it should be const int y = 30;

@andreasfertig
Copy link
Owner

Hello @Waqar144,

thanks for spotting and reporting this! A fix is on its way.

Andreas

@andreasfertig andreasfertig added the bug Something isn't working label Aug 12, 2020
andreasfertig added a commit that referenced this issue Aug 12, 2020
Fixed #337: `const` was missing for a `decltype`-expression with `int`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants