Opened 9 years ago

Closed 9 years ago

#8505 closed Feature Requests (fixed)

Add a C++11 conforming move semantics to function<> class

Reported by: viboes Owned by: Antony Polukhin
Milestone: To Be Determined Component: function
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc: antoshkka@…

Description

C++11 std::function provides move semantics. It would be great if Boost.Function could provide it on C++11 compilers and use Boost.Move on C++ compilers that don't provide rvalue references.

function(function&&);
function& operator=(function&&);
template<class F> function& operator=(F&&);

Change History (3)

comment:1 by Antony Polukhin, 9 years ago

Cc: antoshkka@… added
Owner: changed from Douglas Gregor to Antony Polukhin
Status: newassigned

This issue has been fixed in #7330 without usage of Boost.Move.

Discussion about adding Boost.Move to old libraries can be found here. In short: adding Boost.Move to existing libraries breaks user code.

template<class F> function& operator=(F&&); does not conform C++ Standard and may intentionally break users code on some compilers.

Only one thing remains undone: update documentation.

comment:2 by Antony Polukhin, 9 years ago

(In [84787]) Update documentation of Boost.Function and add info about rvalues (refs #8505)

comment:3 by Antony Polukhin, 9 years ago

Resolution: fixed
Status: assignedclosed

(In [84788]) Merge from trunk:

  • Update documentation of Boost.Function and add info about rvalues (fixes #8505)
Note: See TracTickets for help on using tickets.