Skip to content

Conversation

@ominusliticus
Copy link

The minimum necessary version of C++ had to be bumped to C++17 to avoid any warning message. Additionally, clang is more opinionated on how and when to use constexpr. Static memeber variables can be declared with constexpr keyword, however, if the initialization of that variable is from a function that is not constexpr, such as std::pow (at least until C++26) clang will complain.

So these static initializations need to be moved out of line.

Note that the compiler tested was clang 14.0

The minimum necessary version of C++ had to be bumped to C++17 to avoid
any warning message. Additionally, clang is more opinionated on how and
when to use `constexpr`. Static memeber variables can be declared with
`constexpr` keyword, however, if the initialization of that variable is
from a function that is not `constexpr`, such as `std::pow` (at least
until C++26) clang will complain.

So these static initializations need to be moved out of line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant