Title
More nested types that must be accessible and unambiguous
Status
c++17
Section
[func.require] [refwrap]
Submitter
Jonathan Wakely

Created on 2014-05-23.00:00:00 last changed 89 months ago

Messages

Date: 2014-06-07.20:29:27

Proposed resolution:

This wording is relative to N3936.

  1. Change [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 type T 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 of T;

    • if T is a pointer to member function, result_type shall be a synonym for the return type of T;

    • if T is a class type and the qualified-id T::result_type is valid and denotes a type ([temp.deduct])with a member type result_type, then result_type shall be a synonym for T::result_type;

    • otherwise result_type shall not be defined.

  2. Change [refwrap] p3+p4 as indicated:

    -3- The template instantiation reference_wrapper<T> shall define a nested type named argument_type as a synonym for T1 only if the type T 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 type T1 is cv T0*

    • a class type where the qualified-id T::argument_type is valid and denotes a type ([temp.deduct])with a member type argument_type; the type T1 is T::argument_type.

    -4- The template instantiation reference_wrapper<T> shall define two nested types named first_argument_type and second_argument_type as synonyms for T1 and T2, respectively, only if the type T is any of the following:

    • a function type or a pointer to function type taking two arguments of types T1 and T2

    • a pointer to member function R T0::f(T2) cv (where cv represents the member function's cv-qualifiers); the type T1 is cv T0*

    • a class type where the qualified-ids T::first_argument_type and T::second_argument_type are both valid and both denote types ([temp.deduct])with member types first_argument_type and second_argument_type; the type T1 is T::first_argument_type. and the type T2 is T::second_argument_type.

Date: 2014-06-06.00:00:00

[ 2014-06-06 Library reflector vote ]

The issue has been identified as Tentatively Ready based on six votes in favour.

Date: 2014-06-05.00:00:00

[ 2014-06-05 Daniel provides wording ]

Date: 2014-05-23.00:00:00

Further to 2299 and 2361, [func.require] p3 and [refwrap] p3 and p4 talk about member types without any mention of being accessible and unambiguous.

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2014-11-08 19:44:42adminsetstatus: voting -> wp
2014-11-04 10:26:50adminsetstatus: ready -> voting
2014-06-07 20:29:27adminsetmessages: + msg7009
2014-06-07 20:29:27adminsetstatus: new -> ready
2014-06-05 19:23:47adminsetmessages: + msg6987
2014-06-05 19:23:47adminsetmessages: + msg6986
2014-05-23 00:00:00admincreate