Created
December 22, 2017 05:03
-
-
Save mtao/2c972a0ad8a05a50f908ea6dc8397265 to your computer and use it in GitHub Desktop.
just a quick example of why structured bindings make live easier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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