
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. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1975.html#Diagnosti... The plan is to use these classes uniformly in TR2. Presumably we will want Boost implementations, and use them in other Boost libraries besides Boost.Filesystem. 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 http://mysite.verizon.net/beman/system_error.html 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 17.4.1.2 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! --Beman