Skip to content

Instantly share code, notes, and snippets.

@mtao
Created December 22, 2017 05:03
Show Gist options
  • Save mtao/2c972a0ad8a05a50f908ea6dc8397265 to your computer and use it in GitHub Desktop.
Save mtao/2c972a0ad8a05a50f908ea6dc8397265 to your computer and use it in GitHub Desktop.
just a quick example of why structured bindings make live easier
#include <array>
#include <iostream>
int main() {
std::array<int,2> size = {640,480};
auto [w,h] = size;
std::cout << w << " " << h << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment