Skip to content

Instantly share code, notes, and snippets.

@adiog
Created November 7, 2017 00:03
Show Gist options
  • Save adiog/690a75459e9a6523b73a5742722ee876 to your computer and use it in GitHub Desktop.
Save adiog/690a75459e9a6523b73a5742722ee876 to your computer and use it in GitHub Desktop.
sfinae_class
#include <type_traits>
template <typename T, typename Enable = void>
class foo;
template <typename T>
class foo<T, typename std::enable_if<std::is_integral<T>::value>::type>
{ };
template <typename T>
class foo<T, typename std::enable_if<std::is_floating_point<T>::value>::type>
{ };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment