From: Beman Dawes (bdawes_at_[hidden])
Date: 2006-06-25 10:00:42
The filesystem proposal accepted by the LWG for TR2 also includes a
<system_error> header with a bit of error reporting machinery. In
particular, class error_code to encapsulate error codes from the
operating system and class system_error to be thrown by exceptions.
The plan is to use these classes uniformly in TR2. Presumably we will
want Boost implementations, and use them in other Boost libraries
Because there are likely to be other small operating system dependent
components in the future, I'm suggesting that they go in a separate
Boost.System library. I'm about to post a CPU timer component that would
also fit nicely into Boost.System IMO.
There is an early version of Boost.System stuff in the vault. Go to the
System directory at http://boost-consulting.com/vault/ for system-0.1.zip.
The preliminary error_code/system_error docs can be viewed online at
Note some changes from the TR2 version:
* Use of the unspecified-bool-type idom to test an error_code object to
see if there is a non-zero error code.
* Name changes. The problem with naming is that there are functions
whose most obvious name is "errno", given the long C, C++, and POSIX
tradition. But 220.127.116.11 of the C++ standard specifically says that errno
shall be a macro! Boo. Hiss. So that name is out.
I'm very curious to hear if people think the newer names are an
improvement over the TR2 versions.
And any other comments are welcome!