Created on 2014-06-14.00:00:00 last changed 101 months ago
Proposed resolution:
This wording is relative to N3936.
Change [function.objects] p2, header <functional> synopsis, as indicated:
namespace std {
[…]
// 20.9.11 polymorphic function wrappers:
[…]
template<class R, class... ArgTypes>
bool operator==(const function<R(ArgTypes...)>&, nullptr_t) noexcept;
template<class R, class... ArgTypes>
bool operator==(nullptr_t, const function<R(ArgTypes...)>&) noexcept;
template<class R, class... ArgTypes>
bool operator!=(const function<R(ArgTypes...)>&, nullptr_t) noexcept;
template<class R, class... ArgTypes>
bool operator!=(nullptr_t, const function<R(ArgTypes...)>&) noexcept;
[…]
}
Change [func.wrap.func], class template function synopsis, as indicated:
[…] // 20.9.11.2.1, construct/copy/destroy: […] function& operator=(nullptr_t) noexcept; […]
Change [func.wrap.func.con] before p16 as indicated:
function& operator=(nullptr_t) noexcept;
[ 2014-06-16 Rapperswil ]
Move to Ready
There are two issues here:
std::function's constructor from nullptr_t is marked as noexcept, but its assignment operator from nullptr_t isn't. This assignment can and should be marked as noexcept.
std::function's comparisons with nullptr_t are marked as noexcept in two out of three places.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
| 2014-11-08 19:44:42 | admin | set | status: voting -> wp |
| 2014-11-04 10:26:50 | admin | set | status: ready -> voting |
| 2014-06-16 23:43:35 | admin | set | messages: + msg7054 |
| 2014-06-16 23:43:35 | admin | set | status: new -> ready |
| 2014-06-14 17:51:24 | admin | set | messages: + msg7033 |
| 2014-06-14 00:00:00 | admin | create | |