Skip to content

P3567R2 flat_meow fixes#8524

Merged
tkoeppe merged 2 commits into
cplusplus:mainfrom
eisenwave:motions-2025-11-lwg-4
Dec 14, 2025
Merged

P3567R2 flat_meow fixes#8524
tkoeppe merged 2 commits into
cplusplus:mainfrom
eisenwave:motions-2025-11-lwg-4

Conversation

@eisenwave

Copy link
Copy Markdown
Member

Fixes #8463

No NB comment.

Also fixes cplusplus/papers#2211

PROBLEM: cplusplus/papers#2029 added constexpr to the members of flat_meow, but what we're merging doesn't have any constexpr on it. LWG issue? @jwakely

@eisenwave eisenwave added this to the post-2025-11 milestone Nov 15, 2025
@jwakely

jwakely commented Nov 15, 2025

Copy link
Copy Markdown
Member

There's no need for an issue, the intended design is clear: they should all be constexpr. Please just add constexpr keywords as a fixup commit.

@jensmaurer

Copy link
Copy Markdown
Member

Please just add constexpr keywords as a fixup commit.

Yes, please.

@eisenwave

Copy link
Copy Markdown
Member Author

Alright, I've made them all constexpr in a new commit. It's not a fixup commit because I think it's worth having some record of why we deviate from the paper in the commit history, but Thomas can squash it anyway if he doesn't think so.

Comment thread source/containers.tex
Comment thread source/containers.tex Outdated
Comment thread source/containers.tex Outdated
Comment thread source/containers.tex
Comment on lines +20110 to +20111
$N$ + $M \log M$, where $N$ is \tcode{size()} before the operation and $M$
is \tcode{ranges::distance(rg)}.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$N$ + $M \log M$, where $N$ is \tcode{size()} before the operation and $M$
is \tcode{ranges::distance(rg)}.
$N$ + $M \log M$, where $N$ is \tcode{size()} before the operation
and $M$ is \tcode{ranges::distance(rg)}.

(semantic break)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chosen line break is consistent with what we have further up for flat_map::insert and further below for flat_set::insert.

The and here is also a conjunction in a list, so it seems more appropriate to put it at the end of the line.

Comment thread source/containers.tex Outdated
@eisenwave
eisenwave force-pushed the motions-2025-11-lwg-4 branch from 73480c2 to b6d9c10 Compare November 29, 2025 05:47
@eisenwave

Copy link
Copy Markdown
Member Author

Should be all fixed now.

Had to force-push because the second commit which adds constexpr would be hard to merge with fixups that change sorted_unique_t to sorted_equivalent_ otherwise.

These functions are not marked constexpr in P3567R2, but the intent of the (already merged) P3372R3 is to mark all member functions constexpr.
@tkoeppe
tkoeppe force-pushed the motions-2025-11-lwg-4 branch from 4d51701 to 1e42c87 Compare December 14, 2025 15:58
@tkoeppe
tkoeppe merged commit abfbf8f into cplusplus:main Dec 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2025-11 LWG Motion 4] P3567R2 flat_meow fixes P3567 R2 flat_meow Fixes

4 participants