Title
[fund.ts.v2] std::experimental::function::operator=(F&&) should be constrained
Status
open
Section
[func.wrap.func.con]
Submitter
Tim Song

Created on 2015-12-05.00:00:00 last changed 90 months ago

Messages

Date: 2016-02-07.20:24:45

Proposed resolution:

This wording is relative to N4562.

  1. Insert a paragraph after [func.wrap.func.con]/15 as indicated:

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

    -14- Effects: function(allocator_arg, ALLOCATOR_OF(*this), std::forward<F>(f)).swap(*this);

    -15- Returns: *this.

    -?- Remarks: This assignment operator shall not participate in overload resolution unless declval<decay_t<F>&>() is Callable (C++14 ยง20.9.11.2) for argument types ArgTypes... and return type R.

Date: 2016-02-07.20:24:45

[ 2016-02, Issues Telecon ]

P0; move to Tentatively Ready.

Date: 2015-12-05.00:00:00

Addresses: fund.ts.v2

LWG 2132 constrained std::function's constructor and assignment operator from callable objects for C++14. The constructors of std::experimental::function isn't separately specified in the fundamentals TS and so inherited the constraints from C++14, but the assignment operator is separately specified and presumably needs to be constrained.

History
Date User Action Args
2017-07-30 20:10:41adminsetstatus: wp -> open
2016-03-07 04:18:55adminsetstatus: ready -> wp
2016-02-07 20:24:45adminsetmessages: + msg7964
2016-02-07 20:24:45adminsetstatus: new -> ready
2015-12-19 16:42:28adminsetmessages: + msg7666
2015-12-05 00:00:00admincreate