std::is_constant_evaluated
From cppreference.com
| Defined in header <type_traits>
|
||
| constexpr bool is_constant_evaluated() noexcept; |
(since C++20) | |
Detects whether the function call occurs within a constant-evaluated context. Returns true if the evaluation of the call occurs within the evaluation of an expression or conversion that is