Last active
December 23, 2015 17:00
-
-
Save minjang/f6ed075a7c44760d5677 to your computer and use it in GitHub Desktop.
This file contains 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
// 3. const 예제 | |
cout << "[TEST 3] const\n"; | |
const string E[] = {"foo", "bar", "baz"}; | |
// decltype(p) == pair<size_t, string const&>&& | |
// p 자체는 상수가 아니므로 인덱스 값은 변경 가능, 배열 값은 수정 불가. | |
for (auto &&p : enumerate(E)) | |
cout << (p.first += 1) << ": " << p.second << '\n'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment