[libcxx-commits] [libcxx] [libc++] fix flat_{multi}set insert_range (PR #137462)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Apr 27 00:14:11 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:
No (functional) change requested. Do we want to say the fallback branches are (pedantically) extensions?
https://github.com/llvm/llvm-project/pull/137462
More information about the libcxx-commits
mailing list