SFINAE enable_if explicit constructor
问题 I'm trying to switch between an explicit and an implicit conversion constructor via enable_if . My code currently looks like #include <type_traits> #include <cstdint> enum class enabled {}; template <bool B, typename T = void> using enable_if_t = typename std::enable_if<B, T>::type; template <bool B, typename T = void> using disable_if_t = typename std::enable_if<!B, T>::type; template <std::intmax_t A> struct SStruct { static constexpr std::intmax_t a = A; }; template <typename T> struct