3781. The exposition-only alias templates cont-key-type and cont-mapped-type should be removed

Section: 23.6.1 [container.adaptors.general] Status: C++23 Submitter: Hewill Kang Opened: 2022-09-16 Last modified: 2023-11-22

Priority: Not Prioritized

View all issues with C++23 status.

Discussion:

P0429R9 removed the flat_map's single-range argument constructor and uses C++23-compatible from_range_t version constructor with alias templates range-key-type and range-mapped-type to simplify the deduction guide.

This makes cont-key-type and cont-mapped-type no longer useful, we should remove them.

[2022-10-12; Reflector poll]

Set status to Tentatively Ready after seven votes in favour during reflector poll.

[2022-11-12 Approved at November 2022 meeting in Kona. Status changed: Voting → WP.]

Proposed resolution:

This wording is relative to N4917.

  1. Modify 23.6.1 [container.adaptors.general] as indicated:

    -7- The exposition-only alias template iter-value-type defined in 23.3.1 [sequences.general] and the exposition-only alias templates iter-key-type and iter-mapped-type defined in 23.4.1 [associative.general] may appear in deduction guides for container adaptors.

    -8- The following exposition-only alias templates may appear in deduction guides for container adaptors:

    
    template<class Container>
      using cont-key-type =                                // exposition only
        remove_const_t<typename Container::value_type::first_type>;
    template<class Container>
      using cont-mapped-type =                             // exposition only
        typename Container::value_type::second_type;