Or you could do std::set<SomeType> s = boost::copy_range< std::set<SomeType> >( range );
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of OvermindDL1 Sent: Donnerstag, 4. März 2010 06:38 To: boost-users@lists.boost.org 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
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@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Sebastian Theophil · stheophil@think-cell.com 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