Description
test/ft/constexpr.cpp uses two C++17-only features:
- Constexpr lambdas (added in C++17)
static_assert without message (added in C++17)
However, the root Makefile passes it unconditionally to g++ in the C++14
test target, causing make test c++14 to fail:
constexpr.cpp:12:30: error: lambda expressions are not allowed in unevaluated operands
constexpr.cpp:14:7: error: static assertion without a message is a C++17 extension
Scope
Fix
Add a C++14 guard in the Makefile:
# In the make test loop, skip constexpr.cpp when STD=c++14
Or exclude constexpr.cpp from the list when standard is c++14.
Reproduction
make test c++14
# → build fails on constexpr.cpp
Description
test/ft/constexpr.cppuses two C++17-only features:static_assertwithout message (added in C++17)However, the root
Makefilepasses it unconditionally tog++in the C++14test target, causing
make test c++14to fail:Scope
make test c++14always attempts to buildconstexpr.cppCMAKE_CXX_STANDARD < 17Fix
Add a C++14 guard in the Makefile:
# In the make test loop, skip constexpr.cpp when STD=c++14Or exclude
constexpr.cppfrom the list when standard is c++14.Reproduction