Last active
December 15, 2016 20:44
-
-
Save qbit86/aaa7b953649dd01e595bd8d2ca43247d 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