Boost logo

Boost :

From: dietmar_kuehl (dietmar_kuehl_at_[hidden])
Date: 2002-02-20 11:22:24


Hi,
"bill_kempf" <williamkempf_at_h...> wrote:
> When constructing arrays of objects it would be nice if we could do
> so using something other then the default constructor.

> The above syntax is the most natural, but it could break existing
> code, so maybe instead we'd use [] like so:
>
> foo[2] foos = { [10, 'a'], [20, 'b'] };

I'd propose the following notation instead:

  foo foos[2] = { foo(10, 'a'), foo(20, 'b') };

The the only problem about this notation is that others already had
this idea before and that it is already part of the current standard.
So no need to extend the standard for this one :-(

--
<mailto:dietmar_kuehl_at_[hidden]> <http://www.dietmar-kuehl.de/>
Phaidros eaSE - Easy Software Engineering: <http://www.phaidros.com/>

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