|
Boost Users : |
Subject: Re: [Boost-users] [range] Best way to construct a std::set from a range?
From: Nat Goodspeed (nat_at_[hidden])
Date: 2010-03-03 18:41:29
Gabriel Redner wrote:
> If I have a pair of iterators, I can construct a set like so:
>
> std::set<SomeType> s(it1, it2);
>
> If instead I have a range, I can adapt it like so:
>
> std::set<SomeType> s(boost::begin(range), boost::end(range));
>
> However, my range object is being constructed on the fly. I'd like to
> be able to do:
>
> std::set<SomeType> s(MakeRange(args));
Have you looked at range_ex?
http://www.boostpro.com/vault/index.php?action=downloadfile&filename=range_ex.zip&directory=Algorithms&
I think this has been reviewed, but I don't remember its current
"official" status at the moment.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net