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

Section: 24.6.1 [container.adaptors.general] Status: WP Submitter: Hewill Kang Opened: 2022-09-16 Last modified: 2022-11-15 15:43:02 UTC

Priority: Not Prioritized

View all issues with WP status.


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 24.6.1 [container.adaptors.general] as indicated:

    -7- The exposition-only alias template iter-value-type defined in 24.3.1 [sequences.general] and the exposition-only alias templates iter-key-type and iter-mapped-type defined in 24.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;