Namespaces
Variants
Actions

std::is_constant_evaluated

From cppreference.com
< cpp‎ | types
 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
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