Boost logo

Boost Users :

Subject: Re: [Boost-users] functors created by boost::bind and move semantic
From: Marat Abrarov (abrarov_at_[hidden])
Date: 2011-01-16 17:32:38


To: michi7x7

> > Marat Abrarov:
> > Does anybody know why functional objects created by means of
> > boost::bind have no move constructors. It would be rather useful
> > especially when such functional objects consist of some smart pointers
> > (like boost::shared_ptr).
> > For example, move constructor of boost::shared_ptr is very light
> > (comparing to its copy constructor) - it doesn't use any CAS at all.
> > May be someone know the reason of move constructor absence or maybe
> > someone know any plans of implementing it.

> michi7x7:
> I wondered about that too. The reason might be the huge ammounts of code
> that need to be changed within boost::function.
> However, I'm sure it will come soon.

I mean not boost::function but functors created by boost::bind
(boost::bind_t....) -
they are rather simple - like tuples, so, I think, their move constructors
would be simple too.

But it would be great to have move constructors in boost::function too
(which is more difficult
because of current boost::function implementation).
Interesting, what is about std::function (or std::tr1::function) in STL
implementations
with C++0x support, for example, in STL shipped with MS Visual C++ 2010.

Marat Abrarov.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net