<flat_set>: flat_(multi)set's iterator type should be constant iterator#4132
Conversation
|
FWIW, I usually hear "flat_meow" used to collectively refer to |
Co-authored-by: Casey Carter <cartec69@gmail.com>
<flat_set>: flat_meow's iterator type should be constant iterator<flat_set>: flat_(multi)set's iterator type should be constant iterator
| template <_Different_from<_Kty> _Other> | ||
| requires ( | ||
| _Keylt_transparent && !is_convertible_v<_Other, iterator> && !is_convertible_v<_Other, const_iterator>) | ||
| requires (_Keylt_transparent && !is_convertible_v<_Other, const_iterator>) |
There was a problem hiding this comment.
Is it ok not to add comment for this one? Or am I adding too many repetitive comments?
(Also, there are some remaining iterator in return types (erase etc). I find it trickey to decide whether to return const_iterator/iterator. Returning iterator is more obviously standard-conformant, but that also hides some informations...)
There was a problem hiding this comment.
I probably would have commented this, but it's not really more confusing than the other locations which silently assume that they're the same type. I think this is fine to merge as-is.
| template <_Different_from<_Kty> _Other> | ||
| requires ( | ||
| _Keylt_transparent && !is_convertible_v<_Other, iterator> && !is_convertible_v<_Other, const_iterator>) | ||
| requires (_Keylt_transparent && !is_convertible_v<_Other, const_iterator>) |
There was a problem hiding this comment.
I probably would have commented this, but it's not really more confusing than the other locations which silently assume that they're the same type. I think this is fine to merge as-is.
|
Thanks for |
Citation:
This pr makes
flat_(multi)set'siteratoran alias forconst_iterator.