I defined a function as below, which took an integer as a template parameter, it worked as expected.
template<int D, typename std::enable_if<std::greater<int>{}(D, 100), void*>::type = nullptr>
void func(int p) {
// something
}
func<100>(1); // ERROR
func<101>(1); // OK
Now, I want to make the int as a template parameter too. Meaning that I need something like this:
template<T D, typename std::enable_if<std::greater<T>{}(D, 100), void*>::type = nullptr>
void func(int p) {
// something
}
Well, I've tried as below but it's not compilable.
template<typename T, template<T D, typename std::enable_if<std::greater<T>{}(D, 100), void*>::type = nullptr>>
void func2(int p) {
// something
}