Skip to content

Instantly share code, notes, and snippets.

@Porges
Last active August 29, 2015 13:58
Show Gist options
  • Save Porges/10011099 to your computer and use it in GitHub Desktop.
Save Porges/10011099 to your computer and use it in GitHub Desktop.
template <class PtrType, PtrType>
// e.g. this could be "template<class PtrType, PtrType second>"
// the second arg has the type of the first argument, but isn't a type itself
struct eq {};
struct Foo
{
int val() { return -31; }
};
typedef eq<int (Foo::*)(), &Foo::val> test1;
typedef eq<int, 3> test2;
int main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment