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

Incorrect type of a function returning a rvalue reference to a function or array #124

Closed
languagelawyer opened this issue Feb 21, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@languagelawyer
Copy link

This is similar to #74

int a[2];

int (&&f())[2]
{
  return static_cast<int(&&)[2]>(a);
}

is transformed to

int a[2];


int (&&)[2] f()
{
  return static_cast<int (&&)[2]>(a);
}

And

void g()
{
}

void (&&f())()
{
  return g;
}

into

void g()
{
}


void (&&)() f()
{
  return g;
}
@andreasfertig
Copy link
Owner

Hello @languagelawyer,

thanks for spotting that. A fix is on its way.

andreasfertig added a commit that referenced this issue Feb 21, 2019
Fixed #124: Correct return type of a function returning a rvalue ref.
@andreasfertig andreasfertig added the bug Something isn't working label Sep 30, 2019
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