Boost logo

Boost Users :

Subject: Re: [Boost-users] mpl Generate integral sequence wrapper from 0 to N
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-02-19 23:19:55


On 2/20/2010 10:42 AM, Hicham Mouline wrote:
> Hi,
>
> Given a size_t N known at compile, what’s the cleanest way to generate
>
> mpl::vector_c<size_t, 0, 1, …., N>
>
> what is the fastest way compile-time wise?
>
> what is the most mpl algos reusing way?

May I suggest that all you need is range_c?:

     http://tinyurl.com/y8965l3

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net
http://www.facebook.com/djowel
Meet me at BoostCon
http://www.boostcon.com/home
http://www.facebook.com/boostcon

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