Files
CMake/Tests/Cuda/MixedStandardLevels4/lib.cpp
2019-12-10 17:56:48 -05:00

17 lines
255 B
C++

constexpr int func(int A, int B)
{
#if defined(_MSC_VER) && _MSC_VER < 1913
// no suppport for extended constexpr
return B * A;
#else
// Verify that we have at least c++14
if (A < B) {
return A + B;
} else {
return B * A;
}
#endif
}