Boost logo

Boost :

Subject: Re: [boost] [Boost.Range] missing set insertion
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2013-12-10 01:58:56


> Something like this works when my destination is a vector: > > boost::range::push_back (destV, some_range); > > but there doesn't seem to be anything to use when the destination is a set. The obvious > > boost::range::insert (destS, some_range); > > complains that I don't have enough arguments for insert. > > Looking at the implementation in range/algorithm_ext/insert.hpp, it seems like an > overloaded function without the "before" argument ought to work on any container that has > a .insert(InputIt first, InputIt last ); member function, specifically including std::set > and boost::container::flat_set. > > Is there some technical reason why this isn't supported? If not, I'd like to see what it > takes to get it added. I agree with you that this would be good to have. In fact, there is an open bug for this [1], with a patch. The patch does not include tests and documentation, however. If you're interested in helping, you could do so by writing the tests and documentation and posting an updated patch. I would be happy to review and commit that. Regards, Nate [1] https://svn.boost.org/trac/boost/ticket/6726


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk