Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active February 14, 2018 10:49
Show Gist options
  • Save deque-blog/471036bcf933888345258cbe385801ed to your computer and use it in GitHub Desktop.
Save deque-blog/471036bcf933888345258cbe385801ed to your computer and use it in GitHub Desktop.
// Thanks to auto, we can grow our tuple and it will not break
auto tuple = returns_a_tuple();
auto x = std::get<0>(tuple);
auto y = std::get<1>(tuple);
// With pattern matching the following will break upon growing the tuple
auto [x, y] = returns_a_tuple();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment