|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-07-09 09:44:35
Peter Dimov wrote:
> > That's nice! Do you have an equally simple recipe for std::map
> > initialization?
>
> For maps, I find the sequence of
>
> m[ k ] = v;
>
> good enough for my needs. A static array of pairs has about the same
> overhead per line:
>
> { k, v },
>
> and dropping this down to just
>
> k, v,
>
> never seemed critical, considering the low frequency of
> single-place-hardcoded-init maps.
Ok, I understand. I'm writing at the moment code like:
.......
(*casts)[make_pair(Type::FloatTy, Type::DoubleTy)] =
NM::FTOD;
and I think I'd rather like to eliminate that (*casts) part, and make_pair,
but while assign library can eliminate (*casts), I'm not sure it can do much
about 'make_pair'. Or it can....?
- Volodya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk