This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.
is_deleted on function templatesSection: 21.4.7 [meta.reflection.queries] Status: NAD Submitter: Jakub Jelinek Opened: 2025-12-18 Last modified: 2026-02-20
Priority: 2
View all other issues in [meta.reflection.queries].
View all issues with NAD status.
Discussion:
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.
consteval bool is_deleted(info r); consteval bool is_defaulted(info r);Returns:
trueifrrepresents a function that is a deleted function (9.6.3 [dcl.fct.def.delete]) or defaulted function (9.6.2 [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:
trueifrrepresents a function or function template that is a deleted function (9.6.3 [dcl.fct.def.delete])or defaulted function (9.6.2 [dcl.fct.def.default]), respectively. Otherwise,false.consteval bool is_defaulted(info r);Returns:
trueifrrepresents a function that is adeleted function (9.6.3 [dcl.fct.def.delete]) ordefaulted function (9.6.2 [dcl.fct.def.default]), respectively. Otherwise,false.
[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.
[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.
Proposed resolution:
This wording is relative to N5032.
Modify 21.4.7 [meta.reflection.queries] as indicated:
consteval bool is_deleted(info r);consteval bool is_defaulted(info r);-15- Returns:
trueifrrepresents a function or function template that is a deleted function (9.6.3 [dcl.fct.def.delete])or defaulted function (9.6.2 [dcl.fct.def.default]), respectively. Otherwise,false.consteval bool is_defaulted(info r);-?- Returns:
trueifrrepresents a function that is a defaulted function (9.6.2 [dcl.fct.def.default]). Otherwise,false.