Actually, because of old and annoying legacy, almost none of the math functions can be constexpr
, since they all have the side-effect of setting errno
on various error conditions, usually domain errors.
More Related Contents:
- What’s the difference between constexpr and const?
- Undefined reference to static constexpr char[]
- When does a constexpr function get evaluated at compile time?
- Why do constant expressions have an exclusion for undefined behavior?
- Is is_constexpr possible in C++11?
- constexpr and initialization of a static const void pointer with reinterpret cast, which compiler is right?
- C++11 – static_assert within constexpr function?
- Why do we need to mark functions as constexpr?
- Is constexpr supported with lambda functions / expressions?
- Does constexpr imply inline?
- how to initialize a constexpr reference
- C++11 constexpr function pass parameter
- Constexpr pointer value
- C++11: Compile Time Calculation of Array
- Is std::abs(0u) ill-formed?
- Is it legal to declare a constexpr initializer_list object?
- Static constexpr odr-used or not?
- constexpr function parameters as template arguments
- Is it possible to use std::string in a constexpr?
- Concat two `const char` string literals
- Is a constexpr array necessarily odr-used when subscripted?
- constexpr not compiling in VC2013
- constexpr vs. static const: Which one to prefer?
- constexpr const vs constexpr variables?
- `static constexpr` function called in a constant expression is…an error?
- Why can I call a non-constexpr function inside a constexpr function?
- Why does constexpr static member (of type class) require a definition?
- C++ Linker Error With Class static constexpr
- Why is reinterpret_cast not constexpr?
- Is constexpr really needed?