Created on 2015-12-21.00:00:00 last changed 93 months ago
Rationale (November, 2016):
The type of the function is needed to know how to call it, and the exception specification is part of the function type.
Consider:
#include <type_traits>
template<class T>
T foo(T) noexcept(std::is_nothrow_move_constructible<T>::value);
int main()
{
sizeof(foo(0));
}
According to 14.5 [except.spec] paragraph 13:
An exception specification is considered to be needed when:
- in an expression, the function is selected by overload resolution (12.2 [over.match], 12.3 [over.over]);
- ...
Is it intended that the exception specification is needed for the example? The function call is never evaluated and the exception specification is not queried.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-02-27 00:00:00 | admin | set | messages: + msg6022 |
| 2018-02-27 00:00:00 | admin | set | status: open -> nad |
| 2015-12-21 00:00:00 | admin | create | |