libstdc++: potential bug in specification of layouts.
Luc Grosheintz
luc.grosheintz@gmail.com
Mon Jun 30 09:12:19 GMT 2025
Dear all,
To get to something we can submit to the LWG chair, I propose
the following:
I'll write up a proposal that has three options:
1. A Minimal Fix: This looks a lot like 2. but with enough
constraints that almost no additional pairs of mappings can be
compared.
2. Member-function Fix: The original proposal.
3. Free function Fix: Tomasz proposal.
and then we let people vote. The point is that the three
approaches are different in how much they allow to be compared.
1. Two standardized mappings can always be compared if they
have the same rank. Sometimes one can compare more, e.g. when
comparing with layout_stride. The idea is to make it such that
it doesn't affect comparison with user-defined classes (at
all).
2. A standardized mapping can be compared to another
mapping-alike object, if they have the same rank. This doesn't
inject comparisons between two user-defined classes.
3. Same as 2. but also injects comparison between two
user-defined classes, if they happen to look like mappings.
Does this approach make sense?
Tomasz, since you're very involved, I would like to add you as an
author of the proposal. Naturally, only if you agree with the
precise text of the proposal we'll send in.
Kind regards,
Luc
More information about the Libstdc++
mailing list