Boost logo

Boost Users :

Subject: Re: [Boost-users] [range] Best way to construct a std::set from arange?
From: Sebastian Theophil (stheophil_at_[hidden])
Date: 2010-03-04 05:24:51


Or you could do

std::set<SomeType> s = boost::copy_range< std::set<SomeType> >( range );

> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of OvermindDL1
> Sent: Donnerstag, 4. März 2010 06:38
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] [range] Best way to construct a std::set
> from arange?
>
> On Wed, Mar 3, 2010 at 11:43 AM, Gabriel Redner <gredner_at_[hidden]>
> wrote:
> > Sure, that works - I was hoping for something that fits naturally on
> > one line, though.
>
> Well, you could use phoenix2 for a one-liner:
> assign(arg1, begin(arg2), end(arg2))(s, MakeRange(args))
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

--
Sebastian Theophil · stheophil_at_[hidden]
Software Engineer
 
think-cell Software GmbH · Chausseestr. 8/E · 10115 Berlin, Germany 
http://www.think-cell.com · phone +49 30 666473-10 · toll-free (US) +1 800 891 8091
Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl · Amtsgericht Berlin-Charlottenburg, HRB 85229

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