-
-
Save gene9/ce9b06036a07d33e90700cce04557682 to your computer and use it in GitHub Desktop.
Type Inference in C++11
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
int original = 42; | |
decltype(original) copy = original; | |
decltype((original)) reference = original; | |
original = 1729; | |
std::cout << copy << std::endl; // 42 | |
std::cout << reference << std::endl; // 1729 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment