Title
Possible typos in 'function' description
Status
nad
Section
[func.wrap.func]
Submitter
Bo Persson

Created on 2007-02-25.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change [func.wrap.func]

...
private:
   // [func.wrap.func], undefined operators:
   template<class Function2> bool void operator==(const function<Function2>&);
   template<class Function2> bool void operator!=(const function<Function2>&);
};

Change [func.wrap.func]

template<class Function2> bool void operator==(const function<Function2>&);
template<class Function2> bool void operator!=(const function<Function2>&);
Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

We agree with Daniel's recommendation.

Move to NAD.

Date: 2009-05-02.00:00:00

[ 2009-05-02 Daniel adds: ]

I suggest harmonizing this issue with similar classes. E.g. in [util.smartptr.weak] bool return values for

template <class Y> bool operator<(weak_ptr<Y> const&) const = delete;
template <class Y> bool operator<=(weak_ptr<Y> const&) const = delete;
template <class Y> bool operator>(weak_ptr<Y> const&) const = delete;
template <class Y> bool operator>=(weak_ptr<Y> const&) const = delete;

are used and basically all newer provided deleted copy assignment operators of type X use the canonical return type X& instead of void. Since the note mentioned in the issue description has now already been changed to

deleted overloads close possible hole in the type system

it seems to be of even lesser need to perform the change. Therefore I recommend declaring the issue as NAD.

Date: 2010-10-21.18:28:33

[ Post-Sophia Antipolis: ]

Changed from Pending WP to Open. This issue was voted to WP at the same time the operators were changed from private to deleted. The two issues stepped on each other. What do we want the return type of these deleted functions to be?

Date: 2007-02-25.00:00:00

[func.wrap.func]

The note in paragraph 2 refers to 'undefined void operators', while the section declares a pair of operators returning bool.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3321
2010-10-21 18:28:33adminsetmessages: + msg3320
2010-10-21 18:28:33adminsetmessages: + msg3319
2010-10-21 18:28:33adminsetmessages: + msg3318
2007-02-25 00:00:00admincreate