mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
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.
11 lines
264 B
C++
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
|