Boost logo

Boost Users :

Subject: Re: [Boost-users] Copying Boost.Array initialization code
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2010-12-23 11:36:12


On 23/12/10 17:28, Torri, Stephen CIV NSWCDD, W15 wrote:
> I am looking for the code that enables me to do the following with Boost.Array:
>
> boost::array<unsigned int,16> tmp = { { 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1 } };
>
> I would like to learn how to do this. I have need to easily initialize a 4x4 grid with data.
>
boost array does nothign special. Any class which is defined as a POD
type (Plain Old Data) supports aggregate construction.
To make a POD class, all memeber should be POD and public, dont inherit
from anything and dont provide constructor.


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