A beginner question:
How to put a condition on a template in a multi-templated class:
I tried this:
template <class T, class U>
typename std::enable_if<...>
class foo
{
};
And this:
template <class T,
class U = std::enable_if<...>>
class foo
{
};
But they are not working. Any help would be appreciated 🙂
Declare an additional template parameter defaulted to
voidand specialize it withenable_if: