Boost logo

Boost :

Subject: Re: [boost] [c++11]
From: Niall Douglas (ndouglas_at_[hidden])
Date: 2013-06-17 18:03:49


> > I should quickly explain why rvalue ref support is so important to
proposed
> > Boost.AFIO: it's a 100% batch API and therefore takes in batches of
things
> > to do and returns out batches of results. That implies lots of passing
> > sequences of things around in STL containers, which without rvalue refs
are
> > not cheap to copy. Therefore while we could get the library working on
>
> Maybe BOOST_ASIO_MOVE_ARG (in boost/asio/detail/config.hpp) will work
> for you.

I don't understand how that makes std::vector<> or any other STL container
suddenly magically start not copy constructing its contents on C++03
compilers.

struct async_io_op has both rvalue and const lvalue copy and assignment
constructors. It's left up to the compiler and STL container implementation
to decide when and where to use them. I agree we should be using more
std::move() to help the compiler where it needs it, but all performance
tuning is being left till after the Boost import.

Niall

---
Opinions expressed here are my own and do not necessarily represent those of
BlackBerry Inc.



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