|
Boost : |
From: Andrei Alexandrescu \(See Website for Email\) (andrewalex_at_[hidden])
Date: 2004-07-08 11:12:11
"Peter Dimov" <pdimov_at_[hidden]> wrote in message
news:013e01c464e5$980fd7c0$0600a8c0_at_pdimov...
> David Abrahams wrote:
> > "Andy Little" <andy_at_[hidden]> writes:
> >
> >> "Dave Harris" <brangdon_at_[hidden]> wrote
> >>> In-Reply-To: <cch4as$941$1_at_[hidden]>
> >>>
> >>> has no direct equivalent. It becomes:
> >>> v.clear();
> >>> v << 1 << 2 << 3;
> >>
> >> or v <<= 1 << 2 << 3;
> >
> > surely not ;-)
> >
> > *maybe* it would be
> >
> > (v <<= 1) << 2 << 3
>
> Or maybe we should just use
>
> int cv[] = { 1, 2, 3 };
> v.assign( cv, end(cv) );
>
> as I've been doing for years.
What??? No 'static' in front of cv??? :o)
Now seriously, 'static' can improve performance, and 'const' wouldn't hurt,
either.
Andrei
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk