Можно ли условно скрыть или отключить функции в классе шаблона с помощью компиляции постоянные времени?
Представьте себе следующий класс:
template<size_t M, size_t N>
class MyClassT
{
// I only want this function available if M == N, otherwise it is illegal to call
static MyClassT<M, N> SomeFunc()
{
...
}
}
MyClassT<2,2>::SomeFunc(); // Fine
MyClassT<3,2>::SomeFunc(); // Shouldn't even compile