I would like to use constexpr if
to branch at compile time, but it does not seem to be supported by the latest MSVC compiler. Is there an alternative to the following?:
template<typename T>
void MyFunc()
{
if constexpr(MeetsConditions<T>::value)
{
FunctionA<T>();
}
else
{
FunctionB<T>();
}
}
In short: Can I simulate constexpr if
when it is not supported by the compiler?