Okay, after searching myself half to death and not finding any answer that actually seemed to work I gotta ask:
Say I've got a class (contrived example, but hopefully good enough for now)
template <typename T, std::enable_if_t< MyConditional<T>::value >>
class MyClass
{
public:
static const MyClass ZeroInited;
MyClass(int x, int y)
: m_X(x)
, m_Y(Y)
{
}
...
};
How do I properly initialize ZeroInited
*? The correct syntax just eludes me (or maybe I'm just too tired), and letting tools "Create Implementation" does not produce correct output either. It's
Thanks everyone!
*) PS: in the templated case, not for a specialization. If I leave out the enable_if_t it's easy:
template <typename T> const MyClass<T> MyClass<T>::ZeroInited {0, 0};
but I can't figure out how to change it once enable_if_t comes into play.