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

C++17 structured bindings #1082

Closed
guwirth opened this issue Mar 9, 2017 · 1 comment · Fixed by #1137
Closed

C++17 structured bindings #1082

guwirth opened this issue Mar 9, 2017 · 1 comment · Fixed by #1137
Assignees
Milestone

Comments

@guwirth
Copy link
Collaborator

guwirth commented Mar 9, 2017

Support C++17 Structured Bindings.

Sample:

int[2] f();
auto [ x, y ] = f();

tuple<T1,T2,T3> g();
auto [a,b,c] = g();

struct MyStruct {
  int x;
  double y;
};

MyStruct h();
auto [u,v] = h();

std::map<string, double> mymap;
...
for (const auto& [key,val] : mymap) {
  std::cout << key << ": " << val << std::endl;
}
@guwirth guwirth added this to the 0.9.8 milestone Mar 13, 2017
@guwirth guwirth self-assigned this May 21, 2017
@guwirth guwirth changed the title C++17: Structured Bindings C++17 structured bindings May 23, 2017
@guwirth
Copy link
Collaborator Author

guwirth commented May 23, 2017

related to #1104

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

Successfully merging a pull request may close this issue.

1 participant