This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
is_deleted on function templatesSection: 21.4.7 [meta.reflection.queries] Status: New Submitter: Jakub Jelinek Opened: 2025-12-18 Last modified: 2025-12-20
Priority: Not Prioritized
View all other issues in [meta.reflection.queries].
View all issues with New 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.
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.