Skip to content

std::flat_set dispatches non-c++17 iterators to container's insert(const_iterator, InputIterator, InputIterator) #136656

@hewillk

Description

@hewillk
#include <flat_set>
#include <iterator>
#include <sstream>
#include <ranges>
#include <boost/interprocess/containers/vector.hpp>
 
int main() {
  boost::container::vector<int> v;
  std::flat_set s(v);
  std::istringstream ints("0 1 1 0");
  auto r = std::ranges::subrange(std::istream_iterator<int>(ints),
                                 std::istream_iterator<int>())
         | std::views::transform([](int i) { return i * i; });
  s.insert_range(r);
}

https://godbolt.org/z/6P3rnod76

Metadata

Metadata

Assignees

No one assigned

    Labels

    libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions