Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2002-02-20 12:23:04


I also miss a repeat device in initialising arrays.

int ia[5] = {1(2), 3(2)}

for values 1, 1, 3,3, 0 (because last not initialised)

Count in brackets needs to be constatn expression.
Convenient for setting whole or large part of array to a single value.

Paul

Dr Paul A Bristow, hetp Chromatography
Prizet Farmhouse
Kendal, Cumbria
LA8 8AB UK
+44 1539 561830
Mobile +44 7714 33 02 04
mailto:pbristow_at_[hidden]

> -----Original Message-----
> From: bill_kempf [mailto:williamkempf_at_[hidden]]
> Sent: Wednesday, February 20, 2002 3:56 PM
> To: boost_at_[hidden]
> Subject: [boost] Re: Most needed/desired features in C++
>
>
> Here's one for the list:
>
> When constructing arrays of objects it would be nice if we could do
> so using something other then the default constructor.
>
> Example:
>
> class foo
> {
> public:
> foo(int, char);
> ...
> };
>
> 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'] };
>
> Bill Kempf
>
>
> Info: http://www.boost.org Send unsubscribe requests to:
> <mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>


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