Created
August 18, 2015 06:23
-
-
Save clarkli86/b61a7bbe6e26761d5446 to your computer and use it in GitHub Desktop.
range-based-for and initializer_list in C++
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
| for (int x : {-1, -2, -3}) // the rule for auto makes this ranged-for work | |
| std::cout << x << ' '; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment