Skip to content

Instantly share code, notes, and snippets.

@apskii
Created February 16, 2013 21:57
Show Gist options
  • Save apskii/4968912 to your computer and use it in GitHub Desktop.
Save apskii/4968912 to your computer and use it in GitHub Desktop.
#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