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.
F noexcept
" typeSection: 21.4.12 [meta.reflection.extract] Status: New Submitter: Jan Schultke Opened: 2025-07-10 Last modified: 2025-07-26
Priority: Not Prioritized
View all issues with New status.
Discussion:
This is a follow-up from https://github.com/cplusplus/#8008
In 21.4.12 [meta.reflection.extract] paragraph 7, the type "F noexcept
" is used, presumably
with the intent that noexcept
would be "injected" into the parameters-and-qualifiers of
the declarator associated with F
.
However, the syntax F noexcept
is ill-formed, and does not have that intended effect. There ought
to be a better way to phrase that.
Proposed resolution:
This wording is relative to this CD preview draft.
Modify 21.4.12 [meta.reflection.extract] as indicated:
[Drafting note: In bullet (7.1) we apply an additional drive-by fix for the broken "
T
is" construction before theis_convertible_v
condition]
template<class T> consteval T extract-member-or-function(info r); // exposition only-?- Given a function type
-6- Returns: […] -7- Throws:F
, let the typeF
withnoexcept
be the same type, except that the parameters-and-qualifiers in the noptr-declarator describing the type containnoexcept(true)
.meta::exception
unless
(7.1) —
r
represents a non-static data member with typeX
, that is not a bit-field, that is a direct member of classC
,T
andC
are similar types (7.3.6 [conv.qual]), andT
isis_convertible_v<X C::*, T>
istrue
;(7.2) —
r
represents an implicit object member function with typeF
orF
withnoexcept
that is a direct member of a classC
, andT
isF C::*
; or(7.3) —
r
represents a non-member function, static member function, or explicit object member function of function typeF
orF
withnoexcept
, andT
isF*
.