Created on 2025-12-18.00:00:00 last changed 1 week 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`.
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 |
| 2025-12-20 15:56:05 | admin | set | messages: + msg15838 |
| 2025-12-18 00:00:00 | admin | create | |