This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD Editorial status.
Section: 22.214.171.124 [structure.specifications] Status: NAD Editorial Submitter: Robert Klarer Opened: 2009-07-21 Last modified: 2016-12-23
Priority: Not Prioritized
View all other issues in [structure.specifications].
View all issues with NAD Editorial status.
While reviewing 971 I noted that 126.96.36.199 [structure.specifications]/7 says:
-7- Error conditions specify conditions where a function may fail. The conditions are listed, together with a suitable explanation, as the enum class errc constants (19.5) that could be used as an argument to function make_error_condition (188.8.131.52).
This paragraph should mention make_error_code or the text "that could be used as an argument to function make_error_condition (184.108.40.206)" should be deleted. I believe this is editorial.
[ 2009-07-21 Chris adds: ]
I'm not convinced there's a problem there, because as far as the "Error conditions" clauses are concerned, make_error_condition() is used by a user to test for the condition, whereas make_error_code is not. For example:void foobar(error_code& ec = throws());
permission_denied - Insufficient privilege to perform operation.
When a user writes:error_code ec; foobar(ec); if (ec == errc::permission_denied) ...
the implicit conversion errc->error_condition makes the if-test equivalent to:if (ec == make_error_condition(errc::permission_denied))
On the other hand, if the user had written:if (ec == make_error_code(errc::permission_denied))
the test is now checking for a specific error code. The test may evaluate to false even though foobar() failed due to the documented error condition "Insufficient privilege".
[ 2009 Santa Cruz: ]
What the WP says right now is literally true: these codes can be used as an argument to make_error_condition. (It is also true that they can be used as an argument to make_error_code, which the WP doesn't say.) Maybe it would be clearer to just delete "that could be used as an argument to function make_error_condition", since that fact is already implied by other things that we say. We believe that this is editorial.