Files
codeql/cpp/ql/test/library-tests/specifiers2/cpp20.cpp
Jonas Jensen b2cd98a98f C++: Confirm correct behaviour on C++20
Making `constexpr` imply `const` was correct for C++11 and was a correct
emulation of a GCC bug on GCC < 5.0. This test confirms that the problem
isn't there in C++20.
2020-08-24 13:42:40 +02:00

11 lines
264 B
C++

// semmle-extractor-options: --edg --clang --edg --c++20
namespace cpp20 {
class TestConstexpr {
constexpr int member_constexpr() { return 0; } // not const in C++ >= 14
constexpr int member_const_constexpr() const { return 0; }
};
} // namespace cpp20