This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.
Section: 22.10 [function.objects] Status: Resolved Submitter: Daniel Krügler Opened: 2007-03-19 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [function.objects].
View all issues with Resolved status.
Discussion:
The header <functional> synopsis in 22.10 [function.objects] contains the following two free comparison operator templates for the function class template
template<class Function1, class Function2> void operator==(const function<Function1>&, const function<Function2>&); template<class Function1, class Function2> void operator!=(const function<Function1>&, const function<Function2>&);
which are nowhere described. I assume that they are relicts before the corresponding two private and undefined member templates in the function template (see 22.10.17.3 [func.wrap.func] and [func.wrap.func.undef]) have been introduced. The original free function templates should be removed, because using an undefined entity would lead to an ODR violation of the user.
Proposed resolution:
Remove the above mentioned two function templates from the header <functional> synopsis (22.10 [function.objects])
template<class Function1, class Function2> void operator==(const function<Function1>&, const function<Function2>&); template<class Function1, class Function2> void operator!=(const function<Function1>&, const function<Function2>&);
Rationale:
Fixed by N2292 Standard Library Applications for Deleted Functions.