This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TS status.

2371. [fund.ts] No template aliases defined for new type traits

Section: 3.3.1 [fund.ts::meta.type.synop] Status: TS Submitter: Joe Gottman Opened: 2014-03-07 Last modified: 2017-07-30

Priority: 0

View all issues with TS status.

Discussion:

Addresses: fund.ts

The library fundamentals specification defines two new type trait template classes: invocation_type and raw_invocation_type. But it does not define the corresponding template aliases. Note that both of these classes define a member typedef type and no other public members, so according to the argument in N3887 the template aliases should be defined.

[2013-06-21 Rapperswil]

Accept for Library Fundamentals TS Working Paper

Proposed resolution:

This wording is relative to N3908.

  1. Add the following to section 3.3.1[meta.type.synop] of the Library Fundamentals specification as indicated:

    namespace std {
    namespace experimental {
    inline namespace fundamentals_v1 {
      […]
      // 3.3.2, Other type transformations
      template <class> class invocation_type; // not defined
      template <class F, class... ArgTypes> class invocation_type<F(ArgTypes...)>;
      template <class> class raw_invocation_type; // not defined
      template <class F, class... ArgTypes> class raw_invocation_type<F(ArgTypes...)>;
      
      template <class T> 
        using invocation_type_t = typename invocation_type<T>::type;
      template <class T> 
        using raw_invocation_type_t = typename raw_invocation_type<T>::type;
      
    } // namespace fundamentals_v1
    } // namespace experimental
    } // namespace std