6 ms·
c++ static_if but for class members: template<class Type> class A { if constexpr (std::is_same<Type, int>::value) { int a; } }
by wfwefwef32 8y ago
c++ static_if but for class members:
template<class Type>
class A
{
if constexpr (std::is_same<Type, int>::value)
{
int a;
}
}