Understanding SFINAE
问题 As far as I know, SFINAE means substitution failures do not result in compilation errors, but just remove the prototype from the list of possible overloads. What I do not understand: why is this SFINAE: template <bool C, typename T = void> struct enable_if{}; template <typename T> struct enable_if<true, T> { typedef T type; }; But this is not? template <bool C> struct assert; template <> struct assert<true>{}; From my understanding, the underlying logic is identical here. This question