constexpr
suggest changeVersions
Introduction
constexpr is a keyword that can be used to mark a variable’s value as a constant expression, a function as potentially usable in constant expressions, or (since C++17) an if statement as having only one of its branches selected to be compiled.
Remarks
The constexpr keyword was introduced in C++11. Later standards progressively
relaxed the restrictions on constant evaluation and expanded where constexpr
can be used.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents