Skip to content

<flat_map>: unclear resolution of LWG-3963 "Different flat_(multi)map specializations should be able to share same nested classes" #5965

Description

I've found old LWG issue "Different std::flat_map/std::flat_multimap specializations should be able to share same nested classes" (LWG-3963) submitted by A. Jiang (@frederick-vs-ja).
I'm a little confused about the resolution - the status indicates that it's still open, however, the wording suggests that someone called it not-a-defect and thus threw it off the table.

The standard clearly uses nested struct for containers, but I see reasons why shared struct could be better.
Either way (tested on Godbolt, https://godbolt.org/z/K34P54nPE) the following static assertion passes for both trunk libc++ and libstdc++ but fails on our feature branch.

static_assert(!std::is_same_v<std::flat_map<int, int>::containers, std::flat_multimap<int, int>::containers>);

Any thoughts?

Relevant for completion of #2910.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedSomething works now, yay!flat_meowC++23 container adaptors

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions