[libcxx-commits] [libcxx] [libc++] fix flat_{multi}set insert_range (PR #137462)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 2 07:46:31 PDT 2025
================
@@ -60,7 +61,8 @@ struct __flat_set_utils {
// C++23 Sequence Container should have insert_range member function
// Note that not all Sequence Containers provide append_range.
__set.__keys_.insert_range(__set.__keys_.end(), std::forward<_Range>(__rng));
- } else if constexpr (ranges::common_range<_Range>) {
+ } else if constexpr (ranges::common_range<_Range> &&
+ __has_input_iterator_category<ranges::iterator_t<_Range>>::value) {
----------------
frederick-vs-ja wrote:
Ah, I guess these cases should be moved to the `libcxx/test/libcxx` subdirectory.
https://github.com/llvm/llvm-project/pull/137462
More information about the libcxx-commits
mailing list