[libcxx-commits] [libcxx] [libc++] Fix ambiguity in ranges::advance and ranges::next affecting flat_set (PR #177773)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 29 02:53:42 PST 2026
================
@@ -120,6 +120,7 @@ struct __advance {
// Preconditions: Either `assignable_from<I&, S> || sized_sentinel_for<S, I>` is modeled, or [i, bound_sentinel)
// denotes a range.
template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
+ requires (!__integer_like<_Sp>) && sentinel_for<_Sp, _Ip>
----------------
frederick-vs-ja wrote:
We should avoid duplicating `sentinel_for<_Sp, _Ip>`.
https://github.com/llvm/llvm-project/pull/177773
More information about the libcxx-commits
mailing list