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

2982. Making size_type consistent in associative container deduction guides

Section: 23.5.6.1 [unord.set.overview], 23.5.7.1 [unord.multiset.overview] Status: C++20 Submitter: Mike Spertus Opened: 2017-06-16 Last modified: 2021-02-25

Priority: 2

View all issues with C++20 status.

Discussion:

Due to an incompletely implemented change in Kona, some of the size_type deduction guides say something like:

A size_type parameter type in an unordered_set deduction guide refers to the size_type member type of the primary unordered_set template

while others say

A size_type parameter type in an unordered_map deduction guide refers to the size_type member type of the type deduced by the deduction guide.

Clearly they should both be the same. My recollection is that the intent of the committee was to change them all to be the latter. Note, however, that this issue may be mooted if the suggestions in the upcoming P0433R3 paper are adopted as a DR in Toronto.

[2017-07 Toronto Monday issue prioritization]

Priority 2; Mike is preparing an updated paper — currently named P0433R3.

[2016-07, Toronto Saturday afternoon issues processing]

Status to Ready; Marshall to check with Mike about his paper

Proposed resolution:

This wording is relative to N4659.

  1. Edit 23.5.6.1 [unord.set.overview] as indicated:

    -4- A size_type parameter type in an unordered_set deduction guide refers to the size_type member type of the primary unordered_set templatetype deduced by the deduction guide.

  2. Edit 23.5.7.1 [unord.multiset.overview] as indicated:

    -4- A size_type parameter type in an unordered_multiset deduction guide refers to the size_type member type of the primary unordered_multiset templatetype deduced by the deduction guide.