Created
March 25, 2018 06:42
-
-
Save loliGothicK/e22d5d993f3716251903301be7dc6e34 to your computer and use it in GitHub Desktop.
This file contains 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 <type_traits> | |
#include <utility> | |
template < class T > | |
using always_false_type = std::false_type; | |
template < class T, class = void > | |
class Hoge | |
{ | |
static_assert( always_false_type<T>::value, "T must be integral type!" ); | |
}; | |
template < class T > | |
class Hoge< T, typename std::enable_if< std::is_integral<T>::value >::type > | |
{ | |
// Impl | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment