Section: 22.10.4 [func.require], 22.10.6 [refwrap] Status: C++17 Submitter: Jonathan Wakely Opened: 2014-05-23 Last modified: 2017-07-30
Priority: Not Prioritized
View all other issues in [func.require].
View all issues with C++17 status.
Discussion:
Further to 2299 and 2361, 22.10.4 [func.require] p3 and 22.10.6 [refwrap] p3 and p4 talk about member types without any mention of being accessible and unambiguous.
[2014-06-05 Daniel provides wording]
[2014-06-06 Library reflector vote]
The issue has been identified as Tentatively Ready based on six votes in favour.
Proposed resolution:
This wording is relative to N3936.
Change 22.10.4 [func.require] p3 as indicated:
-3- If a call wrapper (20.9.1) has a weak result type the type of its member type
result_type
is based on the typeT
of the wrapper's target object (20.9.1):
if
T
is a pointer to function type,result_type
shall be a synonym for the return type ofT
;if
T
is a pointer to member function,result_type
shall be a synonym for the return type ofT
;if
T
is a class type and the qualified-idT::result_type
is valid and denotes a type (13.10.3 [temp.deduct])with a member type, thenresult_type
result_type
shall be a synonym forT::result_type
;otherwise
result_type
shall not be defined.
Change 22.10.6 [refwrap] p3+p4 as indicated:
-3- The template instantiation
reference_wrapper<T>
shall define a nested type namedargument_type
as a synonym forT1
only if the typeT
is any of the following:
a function type or a pointer to function type taking one argument of type
T1
a pointer to member function
R T0::f
cv (where cv represents the member function_s cv-qualifiers); the typeT1
is cvT0*
a class type where the qualified-id
T::argument_type
is valid and denotes a type (13.10.3 [temp.deduct])with a member type; the typeargument_type
T1
isT::argument_type
.-4- The template instantiation
reference_wrapper<T>
shall define two nested types namedfirst_argument_type
andsecond_argument_type
as synonyms forT1
andT2
, respectively, only if the typeT
is any of the following:
a function type or a pointer to function type taking two arguments of types
T1
andT2
a pointer to member function
R T0::f(T2)
cv (where cv represents the member function's cv-qualifiers); the typeT1
is cvT0*
a class type where the qualified-ids
T::first_argument_type
andT::second_argument_type
are both valid and both denote types (13.10.3 [temp.deduct])with member types; the typefirst_argument_type
andsecond_argument_type
T1
isT::first_argument_type
.and the typeT2
isT::second_argument_type
.