Section: 184.108.40.206.1 [func.wrap.func.con] Status: C++17 Submitter: Tim Song Opened: 2015-12-05 Last modified: 2017-07-30
View other active issues in [func.wrap.func.con].
View all other issues in [func.wrap.func.con].
View all issues with C++17 status.
220.127.116.11.1 [func.wrap.func.con]/5 guarantees that copying a std::function whose "target is a callable object passed via reference_wrapper or a function pointer" does not throw exceptions, but the standard doesn't provide this guarantee for the move constructor, which makes scant sense.
[2016-02, Issues Telecon]
P0; move to Tentatively Ready.
This wording is relative to N4567.
[Drafting note: The inserted paragraph is a copy of 18.104.22.168.1 [func.wrap.func.con]/5, only changing "copy constructor" to "copy or move constructor". It does not attempt to fix the issue identified in LWG 2370, whose P/R will likely need updating if this wording is adopted.]
Insert after 22.214.171.124.1 [func.wrap.func.con]/6:
function(function&& f); template <class A> function(allocator_arg_t, const A& a, function&& f);
-6- Effects: If !f, *this has no target; otherwise, move-constructs the target of f into the target of *this, leaving f in a valid state with an unspecified value.