Created on 2025-12-18.00:00:00 last changed 2 weeks ago
Proposed resolution:
This wording is relative to N5032.
Modify [meta.reflection.queries] as indicated:
consteval bool is_deleted(info r);consteval bool is_defaulted(info r);-15- Returns: `true` if `r` represents a function or function template that is a deleted function ([dcl.fct.def.delete])
or defaulted function ([dcl.fct.def.default]), respectively. Otherwise, `false`.consteval bool is_defaulted(info r);-?- Returns: `true` if `r` represents a function that is a defaulted function ([dcl.fct.def.default]). Otherwise, `false`.
[ 2026-02-20; LWG telecon; Status changed: New → NAD. ]
The current design does not support querying anything about function templates. The ability to use these functions on function templates should be considered in tandem with querying other properties like parameters, etc.
[ 2026-02-18; Reflector poll. ]
Set priority to 2 after reflector poll.
Split between P1 and NAD votes. Not supporting `is_deleted` for templates is consistent with the current design, as we also do not support parameter reflection or allow querying `has_ellipsis_parameter`.
In gcc-patches/2025-December/704059 Jason Merrill mentioned that `std::meta::is_deleted` should be able to query also deleted function templates, not just deleted functions.
According to [meta.reflection.queries] p15consteval bool is_deleted(info r); consteval bool is_defaulted(info r);Returns: `true` if `r` represents a function that is a deleted function ([dcl.fct.def.delete]) or defaulted function ([dcl.fct.def.default]), respectively. Otherwise, `false`.
and as I think `is_defaulted` on function templates makes no sense, that would mean changing that to
consteval bool is_deleted(info r);Returns: `true` if `r` represents a function or function template that is a deleted function ([dcl.fct.def.delete])
or defaulted function ([dcl.fct.def.default]), respectively. Otherwise, `false`.consteval bool is_defaulted(info r);Returns: `true` if `r` represents a function that is a
deleted function ([dcl.fct.def.delete]) ordefaulted function ([dcl.fct.def.default]), respectively. Otherwise, `false`.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2026-02-20 20:39:01 | admin | set | messages: + msg15962 |
| 2026-02-20 20:39:01 | admin | set | status: new -> nad |
| 2026-02-18 14:59:59 | admin | set | messages: + msg15948 |
| 2025-12-20 15:56:05 | admin | set | messages: + msg15838 |
| 2025-12-18 00:00:00 | admin | create | |