A potentially evaluated expression or conversion is
immediate-escalating
if it is neither initially in an immediate function context
nor a subexpression of an immediate invocation, and
- it is an immediate constant expression or
[
Example 1:
consteval std::meta::info refl() { return ^^int; }
template <auto F> constexpr void ex() { auto x = F(); }
auto p = &ex<refl>;
—
end example]
- it is an immediate invocation that is not a constant expression.
[
Example 2:
consteval int id(int x) { return x; }
template <auto F> constexpr auto apply_to(int i) { return F(i); }
auto p = &apply_to<id>;
—
end example]