#include <type_traits> template<int n> std::enable_if_t<n == 1, int> f() {} // OK template<int n> std::enable_if_t<n > 1, int> g() {} // VS2015 : error C2988: unrecognizable template declaration/definition int main() {}
I know that the error is due to the fact that the compiler accepts the sign "more than" as a sign of completion of the template.
My question is: in this case, how to make the comparison expression legal?
source share