Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48577 - in trunk: boost/system libs/system/src
From: bdawes_at_[hidden]
Date: 2008-09-04 13:36:56


Author: bemandawes
Date: 2008-09-04 13:36:56 EDT (Thu, 04 Sep 2008)
New Revision: 48577
URL: http://svn.boost.org/trac/boost/changeset/48577

Log:
Add error_code throws
Text files modified:
   trunk/boost/system/error_code.hpp | 3 +++
   trunk/libs/system/src/error_code.cpp | 6 ++++++
   2 files changed, 9 insertions(+), 0 deletions(-)

Modified: trunk/boost/system/error_code.hpp
==============================================================================
--- trunk/boost/system/error_code.hpp (original)
+++ trunk/boost/system/error_code.hpp 2008-09-04 13:36:56 EDT (Thu, 04 Sep 2008)
@@ -382,6 +382,9 @@
 
     };
 
+ // predefined error_code object used as "throw on error" tag
+ BOOST_SYSTEM_DECL extern error_code throws;
+
     // non-member functions ------------------------------------------------//
 
     inline bool operator!=( const error_code & lhs,

Modified: trunk/libs/system/src/error_code.cpp
==============================================================================
--- trunk/libs/system/src/error_code.cpp (original)
+++ trunk/libs/system/src/error_code.cpp 2008-09-04 13:36:56 EDT (Thu, 04 Sep 2008)
@@ -396,6 +396,12 @@
   namespace system
   {
 
+ BOOST_SYSTEM_DECL error_code throws; // "throw on error" special error_code;
+ // note that it doesn't matter if this
+ // isn't initialized before use since
+ // the only use is to take its
+ // address for comparison purposes
+
     BOOST_SYSTEM_DECL const error_category & get_system_category()
     {
       static const system_error_category system_category_const;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk