Boost logo

Boost :

From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2008-06-05 09:07:26


See inline below, I'm not sure if this'll work though:

Graham Reitz wrote:
> Is it possible or even reasonable to initialization a boost::array in
> a member initialization list?
>
> foo.h
>
> class foo
> {
> boost::array<int,3> m_array;
> };
>
> foo.cpp

...

#include <boost/assign.hpp>

using namespace boost::assign;

> foo::foo() :
> m_array(list_of(1)(2)(3))
> {}

this was glommed from:

http://www.boost.org/doc/libs/1_35_0/libs/assign/test/array.cpp

Jeff Flinn


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