Boost logo

Boost :

From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2007-10-31 20:07:03

On Wed, 31 Oct 2007 19:50:04 -0400, "Beman Dawes" <bdawes_at_[hidden]> said:
> Emil Dotchevski wrote:
> > Perhaps the enum should be placed in a platform-specific header, for
> > example "boost/system/windows/error_code.hpp"?
> I'll go ahead and put in the BOOST_SYSTEM_NO_ENUM #ifndef. That will at
> least allow users to avoid the system-specific enums if they wish. But
> the enums provide a really nice facility for dealing with
> system-specific errors, so I don't recommend using BOOST_SYSTEM_NO_ENUM
> except in unusual circumstances.

I find the suggestion of separate header files a nice idea. We can
restrict system/error_code.hpp to only those interfaces specified for
C++0x, and have a header file for each of the OS-specific namespaces
(with the same name as the namespace for convenience), i.e.
system/windows_error.hpp, system/linux_error.hpp,
system/cygwin_error.hpp, and so on. Developers have to use the
OS-specific namespace qualification to refer to those error codes
anyway, so it doesn't seem like much extra burden to include the
additional header file.


Boost list run by bdawes at, gregod at, cpdaniel at, john at