Skip to content

Instantly share code, notes, and snippets.

@dminuoso

dminuoso/c.cpp Secret

Created February 26, 2018 20:33
Show Gist options
  • Save dminuoso/6d8146ec3fe6c7ae9feb4cbfb4ea0e09 to your computer and use it in GitHub Desktop.
Save dminuoso/6d8146ec3fe6c7ae9feb4cbfb4ea0e09 to your computer and use it in GitHub Desktop.
struct Z { };
template<class P>
struct S { };
struct E { };
template<class P>
struct Double { typedef E v; };
template<>
struct Double<Z> { typedef Z v; };
template<class P>
struct Double<S<P> > { typedef S<S<typename Double<P>::v> > v; };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment