Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-05-30 15:49:04


--- In boost_at_[hidden], Gary Powell <Gary.Powell_at_s...> wrote:
> Also for insert_unique and insert_equal that take a range, would it
be worth
> it to call m_impl.reserve(m_impl.size() + distance(first,last) ); ?
I know
> it puts another restriction on the implementation, (requires
a "reserve(N)"
> fn) but the added efficiency of allocating the additional space in
one call
> could be worth it.

On second thought, it might not make sense for insert_unique(), since
reserve() might cause a reallocation that wouldn't otherwise be
neccessary.

-Dave


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