Created
February 16, 2013 21:57
-
-
Save apskii/4968912 to your computer and use it in GitHub Desktop.
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 <iostream> | |
| using namespace std; | |
| template <typename Type> | |
| typename Type::Repr quux(Type sig, typename Type::Repr val) { | |
| return val; | |
| } | |
| template <typename Type> | |
| struct Reify { typedef Type Repr; }; | |
| auto String = Reify<string>(); | |
| auto Integer = Reify<int> (); | |
| int main(void) { | |
| cout << quux(String, "escape") | |
| << quux(Integer, 1643728); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment