Boost logo

Boost :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2006-10-02 09:50:38

On Oct 1, 2006, at 8:37 PM, Larry Evans wrote:

> On 10/01/2006 07:17 PM, Douglas Gregor wrote:
> [snip]
>>> What am I doing wrong?
>> Well, you're not doing anything wrong. That section of the proposal
>> was meant to be a "if the initializer lists proposal is accepted,
>> then it would act like this." I didn't actually mean to propose any
>> changes to the initializer syntax, and so I didn't implement them.
>> (That said, it's a relatively simple feature to implement, if we need
>> it to test something out).
> My motivation was to avoid the need for the "external" typedef
> like the rank*_type's in:
> I was hoping this intializer syntax would allow something like:
> rcmatrix<2,2,rank2_type> mat
> {{ 0, 1}
> ,{ 2, 3}
> };
> just like what's done with regular c intialization of a int mat[2][2].

I truly don't know how that initialization is supposed to work with
the initializer list proposal. The part about breaking up initializer
lists into separate arguments means that we'd have something like:

        rcmatrix<2, 2, rank2_type> mat({0, 1}, {2, 3})

But, what types do we deduce for the initializers {0, 1} and {2, 3}?

There's probably a way to make it work out; I just don't know what it


Boost list run by bdawes at, gregod at, cpdaniel at, john at