For the purposes of determining
whether an expression
E is a core constant expression,
the evaluation of a call to a member function of
std::allocator<T>
as defined in
[allocator.members], where
T is a literal type,
does not disqualify
E from being a core constant expression,
even if the actual evaluation of such a call
would otherwise fail the requirements for a core constant expression
. Similarly, the evaluation of a call to
std::destroy_at,
std::ranges::destroy_at,
std::construct_at, or
std::ranges::construct_at
does not disqualify
E
from being a core constant expression unless:
- for a call to std::construct_at or std::ranges::construct_at,
the first argument, of type T*,
does not point
to storage allocated with std::allocator<T> or
to an object whose lifetime began within the evaluation of E, or
the evaluation of the underlying constructor call
disqualifies E from being a core constant expression, or
- for a call to std::destroy_at or std::ranges::destroy_at,
the first argument, of type T*,
does not point
to storage allocated with std::allocator<T> or
to an object whose lifetime began within the evaluation of E, or
the evaluation of the underlying destructor call
disqualifies E from being a core constant expression.