From: bill_kempf (williamkempf_at_[hidden])
Date: 2002-02-20 11:34:08


--- In boost_at_y..., "Rainer Deyke" <root_at_r...> wrote:
> ----- Original Message -----
> From: "bill_kempf" <williamkempf_at_h...>
> To: <boost_at_y...>
> Sent: Wednesday, February 20, 2002 8:55 AM
> Subject: [boost] Re: Most needed/desired features in C++
>
>
> > When constructing arrays of objects it would be nice if we could
do
> > so using something other then the default constructor.
>
> > foo[2] foos = { { 10, 'a' }, { 20, 'b' } };
> >
> > 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'] };
>
> How about:
>
> foo foos[2] = { foo(10, 'a'), foo(20, 'b') };

Sorry, quite true. I was trying to generalize a different problem
and made a horrific mistake in doing so. What I was trying to
illustrate was a simple concept for object literals, but object
literals aren't needed in this case.

Bill Kempf