https://github.com/Kitware/CMake
Raw File
Tip revision: 5b39465ff1eaf8fa5be072cb6a52f53aa1e599a8 authored by Brad King on 08 June 2023, 15:10:11 UTC
CMake 3.27.0-rc1
Tip revision: 5b39465
lib.cpp


constexpr int func(int A, int B)
{
#if defined(_MSC_VER) && _MSC_VER < 1913
  // no support 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
}
back to top