Boost logo

Boost :

From: William Kempf (sirwillard_at_[hidden])
Date: 2000-11-30 15:39:13


--- In boost_at_[hidden], Kevlin Henney <kevlin_at_c...> wrote:
> In message <903j1b+g56r_at_e...>, Giovanni Bavestrelli <giovanni.bav
> estrelli_at_i...> writes
> >Array<int,3> A3(ArraySizes(10)(20)(30)); // 3D Array of ints
>
> One area of possible improvement that I felt when reading the
article
> originally was in this area. Although I recognise there is no
obvious
> syntax, I am not enamoured of this one. What about <<? Or how about
> something quite different:
>
> X(10) + X(20) + X(30)
>
> Where X is an appropriate but short name we haven't yet thought of
that
> indicates dimension :->

Array<int, 3> A3(dim(10) + dim(20) + dim(30));

Or even:

Array<int, 3> A3(dim(10), dim(20), dim(30));

by overloading the comma operator?

Bill Kempf


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