Created on 2018-01-24.00:00:00 last changed 79 months ago
Proposed resolution:
This wording is relative to N4713.
Modify [syserr.errcode.overview] as indicated:
namespace std { class error_code { public: // [syserr.errcode.constructors], constructors […] error_code(int val, const error_category& cat) noexcept; error_code(int val, const error_category&& cat) = delete; […] // [syserr.errcode.modifiers], modifiers void assign(int val, const error_category& cat) noexcept; void assign(int val, const error_category&& cat) = delete; […] }; […] }
[ 2018-06-18 after reflector discussion ]
Priority set to 3
Constructor error_code(int val, const error_category& cat) and member function void assign(int val, const error_category& cat) could be misused if a custom error_category is provided:
error_code ec{1, test_category{}}; // ec holds a pointer/reference to a temporary
History | |||
---|---|---|---|
Date | User | Action | Args |
2018-06-19 05:49:11 | admin | set | messages: + msg9926 |
2018-01-24 20:42:01 | admin | set | messages: + msg9632 |
2018-01-24 00:00:00 | admin | create |