
13 Feb
2013
13 Feb
'13
11:26 a.m.
El 13/02/2013 9:25, Andrey Semashev escribió:
On Wed, Feb 13, 2013 at 1:38 AM, Ion Gaztañaga <igaztanaga@gmail.com> wrote:
I saw that varray has some optimizations for trivial types (dispatching to memcpy) that boost::container misses.
Shouldn't a decent STL implementation do that automatically? AFAIR, STLPort's std::copy would resort to memcpy when possible. Don't other implementations do the same thing?
The problem is that Boost.Container constructs objects using allocator_traits, and the STL has no algorithms for that. Boost.Container should improve these internal algorithms with some type_traits-based dispatching (trivial types, non-throwing operations, etc.). Best, Ion