Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62313 - in trunk: boost/filesystem boost/system libs/filesystem/src libs/filesystem/test libs/system/doc libs/system/src libs/system/test
From: bdawes_at_[hidden]
Date: 2010-05-30 11:38:34


Author: bemandawes
Date: 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
New Revision: 62313
URL: http://svn.boost.org/trac/boost/changeset/62313

Log:
Upgrade system and filesystem to conform system_category and generic_category interface to N3090, the current C++0x working paper, section 19.5, System error support.

Refactor API macros into a new header, boost/system/api_config.hpp.

Prohibit user definition of API macros. Rationale: ensure all translation units use same definitions, cut number of environments that need to be tested.
Added:
   trunk/boost/system/api_config.hpp (contents, props changed)
Text files modified:
   trunk/boost/filesystem/config.hpp | 44 +++++---------
   trunk/boost/system/config.hpp | 18 +-----
   trunk/boost/system/cygwin_error.hpp | 4
   trunk/boost/system/error_code.hpp | 32 +++++-----
   trunk/boost/system/linux_error.hpp | 4
   trunk/boost/system/windows_error.hpp | 4
   trunk/libs/filesystem/src/operations.cpp | 118 ++++++++++++++++++++--------------------
   trunk/libs/filesystem/src/path.cpp | 4
   trunk/libs/filesystem/test/operations_test.cpp | 8 +-
   trunk/libs/filesystem/test/path_test.cpp | 2
   trunk/libs/system/doc/index.html | 14 ++++
   trunk/libs/system/doc/reference.html | 104 ++++++++++++++++++----------------
   trunk/libs/system/src/error_code.cpp | 10 +-
   trunk/libs/system/test/error_code_test.cpp | 108 ++++++++++++++++++------------------
   trunk/libs/system/test/error_code_user_test.cpp | 68 +++++++++++-----------
   trunk/libs/system/test/header_only_test.cpp | 2
   trunk/libs/system/test/initialization_test.cpp | 2
   trunk/libs/system/test/system_error_test.cpp | 30 +++++-----
   trunk/libs/system/test/throw_test.cpp | 2
   19 files changed, 287 insertions(+), 291 deletions(-)

Modified: trunk/boost/filesystem/config.hpp
==============================================================================
--- trunk/boost/filesystem/config.hpp (original)
+++ trunk/boost/filesystem/config.hpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -19,51 +19,39 @@
 # define BOOST_FILESYSTEM_NAMESPACE filesystem
 #endif
 
-// This header implements separate compilation features as described in
-// http://www.boost.org/more/separate_compilation.html
-
 #include <boost/config.hpp>
+#include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
 #include <boost/detail/workaround.hpp>
 
-// determine platform ------------------------------------------------------//
-
-// BOOST_CYGWIN_PATH implies BOOST_WINDOWS_PATH and BOOST_POSIX_API
+// BOOST_POSIX_PATH or BOOST_WINDOWS_PATH specify which path syntax to recognise
 
-# if defined(BOOST_CYGWIN_PATH)
-# if defined(BOOST_POSIX_PATH)
-# error BOOST_POSIX_PATH is invalid when BOOST_CYGWIN_PATH is defined
-# endif
-# if defined(BOOST_WINDOWS_API)
-# error BOOST_WINDOWS_API is invalid when BOOST_CYGWIN_PATH is defined
-# endif
-# define BOOST_WINDOWS_PATH
-# define BOOST_POSIX_API
+# if defined(BOOST_WINDOWS_API) && defined(BOOST_POSIX_PATH)
+# error builds with Windows API do not support BOOST_POSIX_PATH
 # endif
 
-// BOOST_POSIX_API or BOOST_WINDOWS_API specify which API to use
+# if !defined(_WIN32) && !defined(__CYGWIN__) && defined(BOOST_WINDOWS_PATH)
+# error builds on non-Windows platforms do not support BOOST_WINDOWS_PATH
+# endif
 
-# if defined( BOOST_WINDOWS_API ) && defined( BOOST_POSIX_API )
-# error both BOOST_WINDOWS_API and BOOST_POSIX_API are defined
-# elif !defined( BOOST_WINDOWS_API ) && !defined( BOOST_POSIX_API )
-# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
-# define BOOST_WINDOWS_API
+# if defined(BOOST_WINDOWS_PATH) && defined(BOOST_POSIX_PATH)
+# error both BOOST_WINDOWS_PATH and BOOST_POSIX_PATH are defined
+# elif !defined(BOOST_WINDOWS_PATH) && !defined(BOOST_POSIX_PATH)
+# if !defined(BOOST_POSIX_PATH) && (defined(_WIN32) || defined(__CYGWIN__))
+# define BOOST_WINDOWS_PATH
 # else
-# define BOOST_POSIX_API
+# define BOOST_POSIX_PATH
 # endif
 # endif
 
-// BOOST_WINDOWS_PATH enables Windows path syntax recognition
-
-# if !defined(BOOST_POSIX_PATH) && (defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__))
-# define BOOST_WINDOWS_PATH
-# endif
-
 // narrow support only for badly broken compilers or libraries -------------//
 
 # if defined(BOOST_NO_STD_WSTRING) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STD_LOCALE) || BOOST_WORKAROUND(__BORLANDC__, <0x610)
 # define BOOST_FILESYSTEM_NARROW_ONLY
 # endif
 
+// This header implements separate compilation features as described in
+// http://www.boost.org/more/separate_compilation.html
+
 // enable dynamic linking ---------------------------------------------------//
 
 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK)

Added: trunk/boost/system/api_config.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/system/api_config.hpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -0,0 +1,42 @@
+// boost/system/api_config.hpp -------------------------------------------------------//
+
+// Copyright Beman Dawes 2003, 2006, 2010
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/system for documentation.
+
+//--------------------------------------------------------------------------------------//
+
+// Boost.System calls operating system API functions to implement system error category
+// functions. Usually there is no question as to which API is to be used.
+//
+// In the case of MinGW or Cygwin/MinGW, however, both POSIX and Windows API's are
+// available. Chaos ensues if other code thinks one is in use when Boost.System was
+// actually built with the other. This header centralizes the API choice and prevents
+// user definition of API macros, thus elminating the possibility of mismatches and the
+// need to test configurations with little or no practical value.
+//
+
+//--------------------------------------------------------------------------------------//
+
+#ifndef BOOST_SYSTEM_API_CONFIG_HPP
+#define BOOST_SYSTEM_API_CONFIG_HPP
+
+# if defined(BOOST_POSIX_API) || defined(BOOST_WINDOWS_API)
+# error user defined BOOST_POSIX_API or BOOST_WINDOWS_API not supported
+# endif
+
+// BOOST_POSIX_API or BOOST_WINDOWS_API specify which API to use
+// Cygwin/MinGW does not predefine _WIN32.
+// Standalone MinGW and all other known Windows compilers do predefine _WIN32
+// Compilers that predefine _WIN32 or __MINGW32__ do so for Windows 64-bit builds too.
+
+# if defined(_WIN32) || defined(__CYGWIN__) // Windows default, including MinGW and Cygwin
+# define BOOST_WINDOWS_API
+# else
+# define BOOST_POSIX_API
+# endif
+
+#endif // BOOST_SYSTEM_API_CONFIG_HPP

Modified: trunk/boost/system/config.hpp
==============================================================================
--- trunk/boost/system/config.hpp (original)
+++ trunk/boost/system/config.hpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -11,22 +11,10 @@
 #define BOOST_SYSTEM_CONFIG_HPP
 
 #include <boost/config.hpp>
+#include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
 
-// BOOST_POSIX_API or BOOST_WINDOWS_API specify which API to use.
-// If not specified, a sensible default will be applied.
-
-# if defined( BOOST_WINDOWS_API ) && defined( BOOST_POSIX_API )
-# error both BOOST_WINDOWS_API and BOOST_POSIX_API are defined
-# elif !defined( BOOST_WINDOWS_API ) && !defined( BOOST_POSIX_API )
-# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
- // All Win32 development environments, including 64-bit Windows and MinGW, define
- // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
- // so does not define _WIN32 or its variants.
-# define BOOST_WINDOWS_API
-# else
-# define BOOST_POSIX_API
-# endif
-# endif
+// This header implements separate compilation features as described in
+// http://www.boost.org/more/separate_compilation.html
 
 // enable dynamic or static linking as requested --------------------------------------//
 

Modified: trunk/boost/system/cygwin_error.hpp
==============================================================================
--- trunk/boost/system/cygwin_error.hpp (original)
+++ trunk/boost/system/cygwin_error.hpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -23,7 +23,7 @@
   {
     // To construct an error_code after a API error:
     //
- // error_code( errno, system_category )
+ // error_code( errno, system_category() )
 
     // User code should use the portable "posix" enums for POSIX errors; this
     // allows such code to be portable to non-POSIX systems. For the non-POSIX
@@ -46,7 +46,7 @@
     namespace cygwin_error
     {
       inline error_code make_error_code( cygwin_errno e )
- { return error_code( e, get_system_category() ); }
+ { return error_code( e, system_category() ); }
     }
   }
 }

Modified: trunk/boost/system/error_code.hpp
==============================================================================
--- trunk/boost/system/error_code.hpp (original)
+++ trunk/boost/system/error_code.hpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -202,18 +202,18 @@
 
     // predefined error categories -----------------------------------------//
 
- BOOST_SYSTEM_DECL const error_category & get_system_category();
- BOOST_SYSTEM_DECL const error_category & get_generic_category();
+ BOOST_SYSTEM_DECL const error_category & system_category();
+ BOOST_SYSTEM_DECL const error_category & generic_category();
+
+ // deprecated synonyms --------------------------------------------------//
 
- static const error_category & system_category = get_system_category();
- static const error_category & generic_category = get_generic_category();
-
 # ifndef BOOST_SYSTEM_NO_DEPRECATED
- // deprecated synonyms
- inline const error_category & get_posix_category() { return get_generic_category(); }
- static const error_category & posix_category = get_generic_category();
- static const error_category & errno_ecat = get_generic_category();
- static const error_category & native_ecat = get_system_category();
+ inline const error_category & get_system_category() { return system_category(); }
+ inline const error_category & get_generic_category() { return generic_category(); }
+ inline const error_category & get_posix_category() { return generic_category(); }
+ static const error_category & posix_category = generic_category();
+ static const error_category & errno_ecat = generic_category();
+ static const error_category & native_ecat = system_category();
 # endif
 
     // class error_condition -----------------------------------------------//
@@ -225,7 +225,7 @@
     public:
 
       // constructors:
- error_condition() : m_val(0), m_cat(&get_generic_category()) {}
+ error_condition() : m_val(0), m_cat(&generic_category()) {}
       error_condition( int val, const error_category & cat ) : m_val(val), m_cat(&cat) {}
 
       template <class ErrorConditionEnum>
@@ -254,7 +254,7 @@
       void clear()
       {
         m_val = 0;
- m_cat = &get_generic_category();
+ m_cat = &generic_category();
       }
 
       // observers:
@@ -312,7 +312,7 @@
     public:
 
       // constructors:
- error_code() : m_val(0), m_cat(&get_system_category()) {}
+ error_code() : m_val(0), m_cat(&system_category()) {}
       error_code( int val, const error_category & cat ) : m_val(val), m_cat(&cat) {}
 
       template <class ErrorCodeEnum>
@@ -340,7 +340,7 @@
       void clear()
       {
         m_val = 0;
- m_cat = &get_system_category();
+ m_cat = &system_category();
       }
 
       // observers:
@@ -473,11 +473,11 @@
     {
       // explicit conversion:
       inline error_code make_error_code( errc_t e )
- { return error_code( e, get_generic_category() ); }
+ { return error_code( e, generic_category() ); }
 
       // implicit conversion:
       inline error_condition make_error_condition( errc_t e )
- { return error_condition( e, get_generic_category() ); }
+ { return error_condition( e, generic_category() ); }
     }
 
     // error_category default implementation -------------------------------//

Modified: trunk/boost/system/linux_error.hpp
==============================================================================
--- trunk/boost/system/linux_error.hpp (original)
+++ trunk/boost/system/linux_error.hpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -23,7 +23,7 @@
   {
     // To construct an error_code after a API error:
     //
- // error_code( errno, system_category )
+ // error_code( errno, system_category() )
 
     // User code should use the portable "posix" enums for POSIX errors; this
     // allows such code to be portable to non-POSIX systems. For the non-POSIX
@@ -99,7 +99,7 @@
     namespace linux_error
     {
       inline error_code make_error_code( linux_errno e )
- { return error_code( e, get_system_category() ); }
+ { return error_code( e, system_category() ); }
     }
 
   } // namespace system

Modified: trunk/boost/system/windows_error.hpp
==============================================================================
--- trunk/boost/system/windows_error.hpp (original)
+++ trunk/boost/system/windows_error.hpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -29,7 +29,7 @@
 
     // To construct an error_code after a API error:
     //
- // error_code( ::GetLastError(), system_category )
+ // error_code( ::GetLastError(), system_category() )
 
     namespace windows_error
     {
@@ -107,7 +107,7 @@
     namespace windows_error
     {
       inline error_code make_error_code( windows_error_code e )
- { return error_code( e, get_system_category() ); }
+ { return error_code( e, system_category() ); }
     }
 
   } // namespace system

Modified: trunk/libs/filesystem/src/operations.cpp
==============================================================================
--- trunk/libs/filesystem/src/operations.cpp (original)
+++ trunk/libs/filesystem/src/operations.cpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -184,7 +184,7 @@
     DWORD attr( get_file_attributes( ph.c_str() ) );
     if ( attr == 0xFFFFFFFF )
     {
- ec = error_code( ::GetLastError(), system_category );
+ ec = error_code( ::GetLastError(), system_category() );
       if ((ec.value() == ERROR_FILE_NOT_FOUND)
         || (ec.value() == ERROR_PATH_NOT_FOUND)
         || (ec.value() == ERROR_INVALID_NAME) // "tools/jam/src/:sys:stat.h", "//foo"
@@ -222,7 +222,7 @@
   {
     WIN32_FILE_ATTRIBUTE_DATA fad;
     if ( get_file_attributes_ex( ph.c_str(), fad ) == 0 )
- return std::make_pair( error_code( ::GetLastError(), system_category ), false );
+ return std::make_pair( error_code( ::GetLastError(), system_category() ), false );
     return std::make_pair( ok,
       ( fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
         ? is_empty_directory( ph )
@@ -292,14 +292,14 @@
         { return std::make_pair( ok, false ); }
       assert( p1.handle == INVALID_HANDLE_VALUE
         && p2.handle == INVALID_HANDLE_VALUE );
- { return std::make_pair( error_code( error1, system_category), false ); }
+ { return std::make_pair( error_code( error1, system_category()), false ); }
     }
     // at this point, both handles are known to be valid
     BY_HANDLE_FILE_INFORMATION info1, info2;
     if ( !::GetFileInformationByHandle( p1.handle, &info1 ) )
- { return std::make_pair( error_code( ::GetLastError(), system_category ), false ); }
+ { return std::make_pair( error_code( ::GetLastError(), system_category() ), false ); }
     if ( !::GetFileInformationByHandle( p2.handle, &info2 ) )
- { return std::make_pair( error_code( ::GetLastError(), system_category ), false ); }
+ { return std::make_pair( error_code( ::GetLastError(), system_category() ), false ); }
     // In theory, volume serial numbers are sufficient to distinguish between
     // devices, but in practice VSN's are sometimes duplicated, so last write
     // time and file size are also checked.
@@ -322,9 +322,9 @@
     WIN32_FILE_ATTRIBUTE_DATA fad;
     // by now, intmax_t is 64-bits on all Windows compilers
     if ( get_file_attributes_ex( ph.c_str(), fad ) == 0 )
- return std::make_pair( error_code( ::GetLastError(), system_category ), 0 );
+ return std::make_pair( error_code( ::GetLastError(), system_category() ), 0 );
     if ( (fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) !=0 )
- return std::make_pair( error_code( ERROR_FILE_NOT_FOUND, system_category), 0 );
+ return std::make_pair( error_code( ERROR_FILE_NOT_FOUND, system_category()), 0 );
     return std::make_pair( ok,
       (static_cast<boost::uintmax_t>(fad.nFileSizeHigh)
         << (sizeof(fad.nFileSizeLow)*8))
@@ -356,7 +356,7 @@
     }
     else
     {
- result.first = error_code( ::GetLastError(), system_category );
+ result.first = error_code( ::GetLastError(), system_category() );
       result.second.capacity = result.second.free
         = result.second.available = 0;
     }
@@ -377,7 +377,7 @@
     typedef typename String::value_type value_type;
     boost::scoped_array<value_type> buf( new value_type[sz] );
     if ( get_current_directory( sz, buf.get() ) == 0 )
- return error_code( ::GetLastError(), system_category );
+ return error_code( ::GetLastError(), system_category() );
     ph = buf.get();
     return ok;
   }
@@ -390,7 +390,7 @@
   set_current_path_template( const String & ph )
   {
     return error_code( set_current_directory( ph.c_str() )
- ? 0 : ::GetLastError(), system_category );
+ ? 0 : ::GetLastError(), system_category() );
   }
 
   inline std::size_t get_full_path_name(
@@ -411,13 +411,13 @@
     typename String::value_type * pfn;
     std::size_t len = get_full_path_name( ph,
       buf_size , buf, &pfn );
- if ( len == 0 ) return error_code( ::GetLastError(), system_category );
+ if ( len == 0 ) return error_code( ::GetLastError(), system_category() );
     if ( len > buf_size )
     {
       typedef typename String::value_type value_type;
       boost::scoped_array<value_type> big_buf( new value_type[len] );
       if ( (len=get_full_path_name( ph, len , big_buf.get(), &pfn ))
- == 0 ) return error_code( ::GetLastError(), system_category );
+ == 0 ) return error_code( ::GetLastError(), system_category() );
       big_buf[len] = '\0';
       target = big_buf.get();
       return ok;
@@ -436,9 +436,9 @@
         FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
         OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0 ) );
     if ( hw.handle == INVALID_HANDLE_VALUE )
- return error_code( ::GetLastError(), system_category );
+ return error_code( ::GetLastError(), system_category() );
     return error_code( ::GetFileTime( hw.handle, 0, 0, &last_write_time ) != 0
- ? 0 : ::GetLastError(), system_category );
+ ? 0 : ::GetLastError(), system_category() );
   }
 
   template<class String>
@@ -450,9 +450,9 @@
         FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
         OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0 ) );
     if ( hw.handle == INVALID_HANDLE_VALUE )
- return error_code( ::GetLastError(), system_category );
+ return error_code( ::GetLastError(), system_category() );
     return error_code( ::SetFileTime( hw.handle, 0, 0, &last_write_time ) != 0
- ? 0 : ::GetLastError(), system_category );
+ ? 0 : ::GetLastError(), system_category() );
   }
 
   // these constants come from inspecting some Microsoft sample code
@@ -522,11 +522,11 @@
     if ( fs::is_directory( sf ) )
     {
       if ( !remove_directory( ph ) )
- return error_code(::GetLastError(), system_category);
+ return error_code(::GetLastError(), system_category());
     }
     else
     {
- if ( !delete_file( ph ) ) return error_code(::GetLastError(), system_category);
+ if ( !delete_file( ph ) ) return error_code(::GetLastError(), system_category());
     }
     return ok;
   }
@@ -540,7 +540,7 @@
   {
     error_code error, dummy;
     if ( create_directory( dir_ph ) ) return std::make_pair( error, true );
- error = error_code( ::GetLastError(), system_category );
+ error = error_code( ::GetLastError(), system_category() );
     // an error here may simply mean the postcondition is already met
     if ( error.value() == ERROR_ALREADY_EXISTS
       && fs::is_directory( fs::detail::status_api( dir_ph, dummy ) ) )
@@ -561,7 +561,7 @@
     const String & from_ph )
   {
     return error_code( create_hard_link( to_ph.c_str(), from_ph.c_str() )
- ? 0 : ::GetLastError(), system_category );
+ ? 0 : ::GetLastError(), system_category() );
   }
 #endif
 
@@ -599,9 +599,9 @@
       BOOST_FILESYSTEM_DECL error_code not_found_error()
       {
 # ifdef BOOST_WINDOWS_API
- return error_code(ERROR_PATH_NOT_FOUND, system_category);
+ return error_code(ERROR_PATH_NOT_FOUND, system_category());
 # else
- return error_code(ENOENT, system_category);
+ return error_code(ENOENT, system_category());
 # endif
       }
 
@@ -683,7 +683,7 @@
       BOOST_FILESYSTEM_DECL error_code
       create_symlink_api( const std::wstring & /*to_ph*/,
         const std::wstring & /*from_ph*/ )
- { return error_code( ERROR_NOT_SUPPORTED, system_category ); }
+ { return error_code( ERROR_NOT_SUPPORTED, system_category() ); }
 
       BOOST_FILESYSTEM_DECL error_code
       remove_api( const std::wstring & ph ) { return remove_template( ph ); }
@@ -692,14 +692,14 @@
       rename_api( const std::wstring & from, const std::wstring & to )
       {
         return error_code( ::MoveFileW( from.c_str(), to.c_str() )
- ? 0 : ::GetLastError(), system_category );
+ ? 0 : ::GetLastError(), system_category() );
       }
 
       BOOST_FILESYSTEM_DECL error_code
       copy_file_api( const std::wstring & from, const std::wstring & to, bool fail_if_exists )
       {
         return error_code( ::CopyFileW( from.c_str(), to.c_str(), fail_if_exists )
- ? 0 : ::GetLastError(), system_category );
+ ? 0 : ::GetLastError(), system_category() );
       }
 
       BOOST_FILESYSTEM_DECL bool create_file_api( const std::wstring & ph,
@@ -775,7 +775,7 @@
         {
           handle = 0;
           return error_code( ::GetLastError() == ERROR_FILE_NOT_FOUND
- ? 0 : ::GetLastError(), system_category );
+ ? 0 : ::GetLastError(), system_category() );
         }
         target = data.cFileName;
         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
@@ -793,7 +793,7 @@
         {
           int error = ::GetLastError();
           dir_itr_close( handle );
- return error_code( error == ERROR_NO_MORE_FILES ? 0 : error, system_category );
+ return error_code( error == ERROR_NO_MORE_FILES ? 0 : error, system_category() );
         }
         target = data.cFileName;
         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
@@ -863,7 +863,7 @@
       BOOST_FILESYSTEM_DECL error_code
       create_symlink_api( const std::string & /*to_ph*/,
         const std::string & /*from_ph*/ )
- { return error_code( ERROR_NOT_SUPPORTED, system_category ); }
+ { return error_code( ERROR_NOT_SUPPORTED, system_category() ); }
 
       BOOST_FILESYSTEM_DECL error_code
       remove_api( const std::string & ph ) { return remove_template( ph ); }
@@ -872,14 +872,14 @@
       rename_api( const std::string & from, const std::string & to )
       {
         return error_code( ::MoveFileA( from.c_str(), to.c_str() )
- ? 0 : ::GetLastError(), system_category );
+ ? 0 : ::GetLastError(), system_category() );
       }
 
       BOOST_FILESYSTEM_DECL error_code
       copy_file_api( const std::string & from, const std::string & to, bool fail_if_exists )
       {
         return error_code( ::CopyFileA( from.c_str(), to.c_str(), fail_if_exists )
- ? 0 : ::GetLastError(), system_category );
+ ? 0 : ::GetLastError(), system_category() );
       }
 
       BOOST_FILESYSTEM_DECL error_code
@@ -903,7 +903,7 @@
           return error_code( (::GetLastError() == ERROR_FILE_NOT_FOUND
                            // Windows Mobile returns ERROR_NO_MORE_FILES; see ticket #3551
                            || ::GetLastError() == ERROR_NO_MORE_FILES)
- ? 0 : ::GetLastError(), system_category );
+ ? 0 : ::GetLastError(), system_category() );
         }
         target = data.cFileName;
         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
@@ -919,7 +919,7 @@
         {
           bool ok = ::FindClose( handle ) != 0;
           handle = 0;
- return error_code( ok ? 0 : ::GetLastError(), system_category );
+ return error_code( ok ? 0 : ::GetLastError(), system_category() );
         }
         return ok;
       }
@@ -933,7 +933,7 @@
         {
           int error = ::GetLastError();
           dir_itr_close( handle );
- return error_code( error == ERROR_NO_MORE_FILES ? 0 : error, system_category );
+ return error_code( error == ERROR_NO_MORE_FILES ? 0 : error, system_category() );
         }
         target = data.cFileName;
         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
@@ -955,7 +955,7 @@
             ec = ok;
             return fs::file_status( fs::file_not_found );
           }
- ec = error_code( errno, system_category );
+ ec = error_code( errno, system_category() );
           return fs::file_status( fs::status_unknown );
         }
         ec = ok;
@@ -985,7 +985,7 @@
             ec = ok;
             return fs::file_status( fs::file_not_found );
           }
- ec = error_code( errno, system_category );
+ ec = error_code( errno, system_category() );
           return fs::file_status( fs::status_unknown );
         }
         ec = ok;
@@ -1020,7 +1020,7 @@
       {
         struct stat path_stat;
         if ( (::stat( ph.c_str(), &path_stat )) != 0 )
- return std::make_pair( error_code( errno, system_category ), false );
+ return std::make_pair( error_code( errno, system_category() ), false );
         return std::make_pair( ok, S_ISDIR( path_stat.st_mode )
           ? is_empty_directory( ph )
           : path_stat.st_size == 0 );
@@ -1034,7 +1034,7 @@
         struct stat s1;
         int e1( ::stat( ph1.c_str(), &s1 ) );
         if ( e1 != 0 || e2 != 0 )
- return std::make_pair( error_code( e1 != 0 && e2 != 0 ? errno : 0, system_category ), false );
+ return std::make_pair( error_code( e1 != 0 && e2 != 0 ? errno : 0, system_category() ), false );
         // at this point, both stats are known to be valid
         return std::make_pair( ok,
             s1.st_dev == s2.st_dev
@@ -1051,9 +1051,9 @@
       {
         struct stat path_stat;
         if ( ::stat( ph.c_str(), &path_stat ) != 0 )
- return std::make_pair( error_code( errno, system_category ), 0 );
+ return std::make_pair( error_code( errno, system_category() ), 0 );
         if ( !S_ISREG( path_stat.st_mode ) )
- return std::make_pair( error_code( EPERM, system_category ), 0 );
+ return std::make_pair( error_code( EPERM, system_category() ), 0 );
         return std::make_pair( ok,
           static_cast<boost::uintmax_t>(path_stat.st_size) );
       }
@@ -1065,7 +1065,7 @@
         space_pair result;
         if ( ::BOOST_STATVFS( ph.c_str(), &vfs ) != 0 )
         {
- result.first = error_code( errno, system_category );
+ result.first = error_code( errno, system_category() );
           result.second.capacity = result.second.free
             = result.second.available = 0;
         }
@@ -1087,7 +1087,7 @@
       {
         struct stat path_stat;
         if ( ::stat( ph.c_str(), &path_stat ) != 0 )
- return std::make_pair( error_code( errno, system_category ), 0 );
+ return std::make_pair( error_code( errno, system_category() ), 0 );
         return std::make_pair( ok, path_stat.st_mtime );
       }
 
@@ -1096,11 +1096,11 @@
       {
         struct stat path_stat;
         if ( ::stat( ph.c_str(), &path_stat ) != 0 )
- return error_code( errno, system_category );
+ return error_code( errno, system_category() );
         ::utimbuf buf;
         buf.actime = path_stat.st_atime; // utime() updates access time too:-(
         buf.modtime = new_value;
- return error_code( ::utime( ph.c_str(), &buf ) != 0 ? errno : 0, system_category );
+ return error_code( ::utime( ph.c_str(), &buf ) != 0 ? errno : 0, system_category() );
       }
 
       BOOST_FILESYSTEM_DECL error_code
@@ -1117,7 +1117,7 @@
 # if defined(__MSL__) && (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
               && errno != 0
 # endif
- ) return error_code( errno, system_category );
+ ) return error_code( errno, system_category() );
           }
           else
           {
@@ -1132,7 +1132,7 @@
       set_current_path_api( const std::string & ph )
       {
         return error_code( ::chdir( ph.c_str() )
- ? errno : 0, system_category );
+ ? errno : 0, system_category() );
       }
 
       BOOST_FILESYSTEM_DECL fs::detail::query_pair
@@ -1144,7 +1144,7 @@
         error_code dummy;
         if ( ec != EEXIST
           || !fs::is_directory( status_api( ph, dummy ) ) )
- { return std::make_pair( error_code( ec, system_category ), false ); }
+ { return std::make_pair( error_code( ec, system_category() ), false ); }
         return std::make_pair( ok, false );
       }
 
@@ -1153,7 +1153,7 @@
           const std::string & from_ph )
       {
         return error_code( ::link( to_ph.c_str(), from_ph.c_str() ) == 0
- ? 0 : errno, system_category );
+ ? 0 : errno, system_category() );
       }
 
       BOOST_FILESYSTEM_DECL error_code
@@ -1161,7 +1161,7 @@
           const std::string & from_ph )
       {
         return error_code( ::symlink( to_ph.c_str(), from_ph.c_str() ) == 0
- ? 0 : errno, system_category );
+ ? 0 : errno, system_category() );
       }
 
       BOOST_FILESYSTEM_DECL error_code
@@ -1179,7 +1179,7 @@
 
         // ignore errors if post-condition satisfied
         return status_api(ph, ec).type() == file_not_found
- ? ok : error_code( error, system_category ) ;
+ ? ok : error_code( error, system_category() ) ;
       }
 
       BOOST_FILESYSTEM_DECL error_code
@@ -1188,9 +1188,9 @@
         // POSIX is too permissive so must check
         error_code dummy;
         if ( fs::exists( status_api( to, dummy ) ) )
- return error_code( EEXIST, system_category );
+ return error_code( EEXIST, system_category() );
         return error_code( std::rename( from.c_str(), to.c_str() ) != 0
- ? errno : 0, system_category );
+ ? errno : 0, system_category() );
       }
 
       BOOST_FILESYSTEM_DECL error_code
@@ -1205,11 +1205,11 @@
         // introduced a gratuitous race condition; the stat() is now done after the open()
 
         if ( (infile = ::open( from_file_ph.c_str(), O_RDONLY )) < 0 )
- { return error_code( errno, system_category ); }
+ { return error_code( errno, system_category() ); }
 
         struct stat from_stat;
         if ( ::stat( from_file_ph.c_str(), &from_stat ) != 0 )
- { return error_code( errno, system_category ); }
+ { return error_code( errno, system_category() ); }
 
         int oflag = O_CREAT | O_WRONLY;
         if ( fail_if_exists ) oflag |= O_EXCL;
@@ -1218,7 +1218,7 @@
           int open_errno = errno;
           BOOST_ASSERT( infile >= 0 );
           ::close( infile );
- return error_code( open_errno, system_category );
+ return error_code( open_errno, system_category() );
         }
 
         ssize_t sz, sz_read=1, sz_write;
@@ -1243,7 +1243,7 @@
         if ( ::close( infile) < 0 ) sz_read = -1;
         if ( ::close( outfile) < 0 ) sz_read = -1;
 
- return error_code( sz_read < 0 ? errno : 0, system_category );
+ return error_code( sz_read < 0 ? errno : 0, system_category() );
       }
 
       // this code is based on Stevens and Rago, Advanced Programming in the
@@ -1263,7 +1263,7 @@
           {
             if ( errno == 0 ) // indeterminate
               max = 4096; // guess
- else return error_code( errno, system_category );
+ else return error_code( errno, system_category() );
           }
           else max = static_cast<std::size_t>( tmp + 1 ); // relative root
         }
@@ -1277,7 +1277,7 @@
         file_status &, file_status & )
       {
         if ( (handle = ::opendir( dir.c_str() )) == 0 )
- return error_code( errno, system_category );
+ return error_code( errno, system_category() );
         target = std::string( "." ); // string was static but caused trouble
                                      // when iteration called from dtor, after
                                      // static had already been destroyed
@@ -1298,7 +1298,7 @@
         if ( handle == 0 ) return ok;
         DIR * h( static_cast<DIR*>(handle) );
         handle = 0;
- return error_code( ::closedir( h ) == 0 ? 0 : errno, system_category );
+ return error_code( ::closedir( h ) == 0 ? 0 : errno, system_category() );
       }
 
       // warning: the only dirent member updated is d_name
@@ -1335,7 +1335,7 @@
         dirent * result;
         int return_code;
         if ( (return_code = readdir_r_simulator( static_cast<DIR*>(handle),
- entry, &result )) != 0 ) return error_code( errno, system_category );
+ entry, &result )) != 0 ) return error_code( errno, system_category() );
         if ( result == 0 ) return dir_itr_close( handle, buffer );
         target = entry->d_name;
 # ifdef BOOST_FILESYSTEM_STATUS_CACHE

Modified: trunk/libs/filesystem/src/path.cpp
==============================================================================
--- trunk/libs/filesystem/src/path.cpp (original)
+++ trunk/libs/filesystem/src/path.cpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -142,7 +142,7 @@
         work.get()+work_size, to_next ) != std::codecvt_base::ok )
         boost::throw_exception( boost::filesystem::wfilesystem_error(
           "boost::filesystem::wpath::to_external conversion error",
- ph, system::error_code( system::posix::invalid_argument, system::system_category ) ) );
+ ph, system::error_code( system::posix::invalid_argument, system::system_category() ) ) );
       *to_next = '\0';
       return external_string_type( work.get() );
     }
@@ -161,7 +161,7 @@
         work.get()+work_size, to_next ) != std::codecvt_base::ok )
         boost::throw_exception( boost::filesystem::wfilesystem_error(
           "boost::filesystem::wpath::to_internal conversion error",
- system::error_code( system::posix::invalid_argument, system::system_category ) ) );
+ system::error_code( system::posix::invalid_argument, system::system_category() ) ) );
       *to_next = L'\0';
       return internal_string_type( work.get() );
     }

Modified: trunk/libs/filesystem/test/operations_test.cpp
==============================================================================
--- trunk/libs/filesystem/test/operations_test.cpp (original)
+++ trunk/libs/filesystem/test/operations_test.cpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -73,7 +73,7 @@
     std::ofstream f( ph.file_string().c_str() );
     if ( !f )
       throw fs::filesystem_error( "operations_test create_file",
- ph, error_code(errno, system_category) );
+ ph, error_code(errno, system_category()) );
     if ( !contents.empty() ) f << contents;
   }
 
@@ -82,7 +82,7 @@
     std::ifstream f( ph.file_string().c_str() );
     if ( !f )
       throw fs::filesystem_error( "operations_test verify_file",
- ph, error_code(errno, system_category) );
+ ph, error_code(errno, system_category()) );
     std::string contents;
     f >> contents;
     if ( contents != expected )
@@ -276,9 +276,7 @@
       language_id = 0x0409; // Assume US English
 # endif
 # else
- platform = ( platform == "Win32" || platform == "Win64" || platform == "Cygwin" )
- ? "Windows"
- : "POSIX";
+# error API should always be defined. Something is wrong with boost/system/api_config.hpp
 # endif
   std::cout << "API is " << platform << std::endl;
 

Modified: trunk/libs/filesystem/test/path_test.cpp
==============================================================================
--- trunk/libs/filesystem/test/path_test.cpp (original)
+++ trunk/libs/filesystem/test/path_test.cpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -81,7 +81,7 @@
   void exception_tests()
   {
     const std::string str_1("string-1");
- boost::system::error_code ec( 12345, boost::system::system_category);
+ boost::system::error_code ec( 12345, boost::system::system_category());
     try { throw fs::filesystem_error( str_1, ec ); }
     catch ( const fs::filesystem_error & ex )
     {

Modified: trunk/libs/system/doc/index.html
==============================================================================
--- trunk/libs/system/doc/index.html (original)
+++ trunk/libs/system/doc/index.html 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -93,6 +93,18 @@
 error_code.hpp</code> header, system-specific headers support the Cygwin, Linux,
 and Windows platforms. These headers are effectively no-ops if included for
 platforms other than their intended target.</p>
+<table border="1" cellpadding="10" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111">
+ <tr>
+ <td>The Boost System Library will become part of the C++0x Standard Library.
+ A number of changes, particularly to names, were made by the C++ committee
+ during standardization. The Boost implementation is tracking those changes.
+ See Deprecated names for
+ synonyms provided to prevent breakage of existing user code. See
+ Breaking changes for changes
+ that unavoidably break existing user code. All breaking changes are noisy
+ and will cause compile-time errors.</td>
+ </tr>
+</table>
 <h2><a name="Design_Rationale">Design Rationale</a></h2>
 <p>Class <code>error_code</code>&nbsp; and <code>error_condition</code> are designed as a value types so
 they can be copied
@@ -133,7 +145,7 @@
 <hr>
 
 <p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->February 23, 2008<!--webbot bot="Timestamp" endspan i-checksum="41408" --> </font>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->May 28, 2010<!--webbot bot="Timestamp" endspan i-checksum="11241" --> </font>
 </p>
 
 <p>© Copyright Beman Dawes, 1999</p>

Modified: trunk/libs/system/doc/reference.html
==============================================================================
--- trunk/libs/system/doc/reference.html (original)
+++ trunk/libs/system/doc/reference.html 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -40,6 +40,7 @@
       <a href="#Introduction">Introduction</a><br>
       <a href="#Macros">Macros</a><br>
       <a href="#Deprecated-names">Deprecated names</a><br>
+ Breaking changes<br>
       <a href="#Header-error_code">Header &lt;boost/system/error_code.hpp&gt;</a><br>
       <a href="#Class-error_category">Class <code>error_category</code></a><br>
       &nbsp;&nbsp;&nbsp;Class error_category synopsis<br>
@@ -77,55 +78,50 @@
 <h2><a name="Macros">Macros</a></h2>
 <p>Users may defined the following macros if desired. Sensible defaults are
 provided, so users may ignore these macros if they prefer.</p>
-<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
+<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" height="368">
   <tr>
- <td><b><i>Macro Name</i></b></td>
- <td><b><i>Default</i></b></td>
- <td><b><i>Effect if defined</i></b></td>
+ <td height="16"><b><i>Macro Name</i></b></td>
+ <td height="16"><b><i>Default</i></b></td>
+ <td height="16"><b><i>Effect if defined</i></b></td>
   </tr>
   <tr>
- <td valign="top"><code>BOOST_WINDOWS_API</code></td>
- <td valign="top">Defined if Windows is detected by Boost.System's automatic configuration
- code, otherwise not defined.</td>
- <td valign="top">Implementation uses the Microsoft Windows native
- application program interface (API).</td>
- </tr>
- <tr>
- <td valign="top"><code>BOOST_POSIX_API</code></td>
- <td valign="top">Defined if Windows is not detected by Boost.System's automatic configuration
- code.</td>
- <td valign="top">Implementation uses the POSIX native
- application program interface (API).</td>
- </tr>
- <tr>
- <td valign="top"><code>BOOST_SYSTEM_DYN_LINK</code></td>
- <td valign="top">Defined if <code>BOOST_ALL_DYN_LINK</code> is defined,
+ <td valign="top" height="64"><code>BOOST_SYSTEM_DYN_LINK</code></td>
+ <td valign="top" height="64">Defined if <code>BOOST_ALL_DYN_LINK</code> is defined,
     otherwise not defined.</td>
- <td valign="top">Boost.System library is dynamically linked. If not defined,
+ <td valign="top" height="64">Boost.System library is dynamically linked. If not defined,
     static linking is assumed.</td>
   </tr>
   <tr>
- <td valign="top"><code>BOOST_SYSTEM_NO_LIB</code></td>
- <td valign="top">Defined if <code>BOOST_ALL_NO_LIB</code> is defined,
+ <td valign="top" height="47"><code>BOOST_SYSTEM_NO_LIB</code></td>
+ <td valign="top" height="47">Defined if <code>BOOST_ALL_NO_LIB</code> is defined,
     otherwise not defined.</td>
- <td valign="top">Boost.System library does not use the Boost auto-link
+ <td valign="top" height="47">Boost.System library does not use the Boost auto-link
     facility.</td>
   </tr>
   <tr>
- <td valign="top"><code>BOOST_SYSTEM_NO_DEPRECATED</code></td>
- <td valign="top">Not defined.</td>
- <td valign="top">Deprecated features are excluded.</td>
+ <td valign="top" height="32"><code>BOOST_SYSTEM_NO_DEPRECATED</code></td>
+ <td valign="top" height="32">Not defined.</td>
+ <td valign="top" height="32">Deprecated features are excluded.</td>
   </tr>
-</table>
+ </table>
 <h2><a name="Deprecated-names">Deprecated names</a></h2>
-<p>In the process of adding Boost.System to C++0x standard library, some of the
-names are being changed. To ease transition, Boost.System deprecates the old
+<p>In the process of adding Boost.System to C++0x standard library, the C++
+committee changed some
+names. To ease transition, Boost.System deprecates the old
 names, but continues to provide them unless macro <code>BOOST_SYSTEM_NO_DEPRECATED</code>
 is defined.</p>
 <table border="1" cellpadding="5" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111">
   <tr>
- <td><b><i>Old name, now deprecated</i></b></td>
- <td><b><i>New name</i></b></td>
+ <td><b><i>Old usage, now deprecated</i></b></td>
+ <td><b><i>Replacement</i></b></td>
+ </tr>
+ <tr>
+ <td><code>get_generic_category()</code></td>
+ <td><code>generic_category()</code></td>
+ </tr>
+ <tr>
+ <td><code>get_system_category()</code></td>
+ <td><code>system_category()</code></td>
   </tr>
   <tr>
     <td><code>namespace posix</code></td>
@@ -141,21 +137,39 @@
   </tr>
   <tr>
     <td><code>get_posix_category()</code></td>
- <td><code>get_generic_category()</code></td>
+ <td><code>generic_category()</code></td>
   </tr>
   <tr>
     <td><code>posix_category</code></td>
- <td><code>generic_category</code></td>
+ <td><code>generic_category()</code></td>
   </tr>
   <tr>
     <td><code>errno_ecat</code></td>
- <td><code>generic_category</code></td>
+ <td><code>generic_category()</code></td>
   </tr>
   <tr>
     <td><code>native_ecat</code></td>
- <td><code>system_category</code></td>
+ <td><code>system_category()</code></td>
   </tr>
 </table>
+<h2><a name="Breaking-changes">Breaking changes</a></h2>
+<p>Two static consts are replaced by functions. These are breaking changes best
+fixed by globally adding () to these names to turn them into function calls.</p>
+<table border="1" cellpadding="5" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111">
+ <tr>
+ <td><b><i>Old usage, now broken</i></b></td>
+ <td><b><i>Replacement</i></b></td>
+ </tr>
+ <tr>
+ <td><code>generic_category</code></td>
+ <td><code>generic_category()</code></td>
+ </tr>
+ <tr>
+ <td><code>system_category</code></td>
+ <td><code>system_category()</code></td>
+ </tr>
+ </table>
+<p>User-defined BOOST_POSIX_API and BOOST_WINDOWS_API are no longer supported.</p>
 <h2><a name="Header-error_code">Header &lt;boost/system/error_code.hpp&gt;</a></h2>
 <h3>&lt;boost/system/error_code.hpp&gt; synopsis</h3>
 <blockquote>
@@ -265,9 +279,6 @@
     template<> struct is_error_condition_enum<posix::posix_errno>&lt;errc::errc_t&gt;
       { static const bool value = true; };
 
- // predefined error_code object used as &quot;throw on error&quot; tag
- extern error_code throws;
-
     // non-member functions
 
     bool operator==( const error_code &amp; lhs, const error_code &amp; rhs );
@@ -336,11 +347,8 @@
       bool operator&lt; ( const error_category &amp; rhs ) const;
     };
 
- const error_category &amp; get_system_category();
- const error_category &amp; get_generic_category();
-
- static const error_category &amp; system_category = get_system_category();
- static const error_category &amp; generic_category = get_generic_category();
+ const error_category &amp; system_category();
+ const error_category &amp; generic_category();
   }
 }</pre>
 </blockquote>
@@ -402,13 +410,13 @@
 </blockquote>
 <h3><a name="Class-error_category-non-member-functions">Class <code>error_category</code>
 non-member functions</a></h3>
-<pre>const error_category &amp; get_system_category();</pre>
+<pre>const error_category &amp; system_category();</pre>
 <blockquote>
   <p><i>Returns:</i> A reference to a <code>error_category</code> object
   identifying errors originating from the operating system.</p>
   <p><i>Throws:</i> Nothing.</p>
 </blockquote>
-<pre>const error_category &amp; get_generic_category();</pre>
+<pre>const error_category &amp; generic_category();</pre>
 <blockquote>
   <p><i>Returns:</i> A reference to a <code>error_category</code> object
   identifying portable error conditions.</p>
@@ -831,7 +839,7 @@
 <hr>
 
 <p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->October 11, 2008<!--webbot bot="Timestamp" endspan i-checksum="30976" --> </font>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->May 29, 2010<!--webbot bot="Timestamp" endspan i-checksum="11273" --> </font>
 </p>
 
 <p>© Copyright Beman Dawes, 2006, 2007, 2008</p>
@@ -841,4 +849,4 @@
 
 </body>
 
-</html>
+</html>
\ No newline at end of file

Modified: trunk/libs/system/src/error_code.cpp
==============================================================================
--- trunk/libs/system/src/error_code.cpp (original)
+++ trunk/libs/system/src/error_code.cpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -159,7 +159,7 @@
     switch ( ev )
     {
     case 0: return make_error_condition( success );
- # if defined(BOOST_POSIX_API)
+# if defined(BOOST_POSIX_API)
     // POSIX-like O/S -> posix_errno decode table ---------------------------//
     case E2BIG: return make_error_condition( argument_list_too_long );
     case EACCES: return make_error_condition( permission_denied );
@@ -329,7 +329,7 @@
     case WSAETIMEDOUT: return make_error_condition( timed_out );
     case WSAEWOULDBLOCK: return make_error_condition( operation_would_block );
   #endif
- default: return error_condition( ev, system_category );
+ default: return error_condition( ev, system_category() );
     }
   }
 
@@ -337,7 +337,7 @@
 
   std::string system_error_category::message( int ev ) const
   {
- return generic_category.message( ev );
+ return generic_category().message( ev );
   }
 # else
 // TODO:
@@ -423,13 +423,13 @@
                                          // address for comparison purposes
 # endif
 
- BOOST_SYSTEM_DECL const error_category & get_system_category()
+ BOOST_SYSTEM_DECL const error_category & system_category()
     {
       static const system_error_category system_category_const;
       return system_category_const;
     }
 
- BOOST_SYSTEM_DECL const error_category & get_generic_category()
+ BOOST_SYSTEM_DECL const error_category & generic_category()
     {
       static const generic_error_category generic_category_const;
       return generic_category_const;

Modified: trunk/libs/system/test/error_code_test.cpp
==============================================================================
--- trunk/libs/system/test/error_code_test.cpp (original)
+++ trunk/libs/system/test/error_code_test.cpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -68,20 +68,20 @@
   std::cout << "General tests...\n";
   // unit tests:
 
- BOOST_TEST( generic_category == generic_category );
- BOOST_TEST( system_category == system_category );
- BOOST_TEST( generic_category != system_category );
- BOOST_TEST( system_category != generic_category );
+ BOOST_TEST( generic_category() == generic_category() );
+ BOOST_TEST( system_category() == system_category() );
+ BOOST_TEST( generic_category() != system_category() );
+ BOOST_TEST( system_category() != generic_category() );
 
- if ( std::less<const error_category*>()( &generic_category, &system_category ) )
+ if ( std::less<const error_category*>()( &generic_category(), &system_category() ) )
   {
- BOOST_TEST( generic_category < system_category );
- BOOST_TEST( !(system_category < generic_category) );
+ BOOST_TEST( generic_category() < system_category() );
+ BOOST_TEST( !(system_category() < generic_category()) );
   }
   else
   {
- BOOST_TEST( system_category < generic_category );
- BOOST_TEST( !(generic_category < system_category) );
+ BOOST_TEST( system_category() < generic_category() );
+ BOOST_TEST( !(generic_category() < system_category()) );
   }
 
 
@@ -91,29 +91,29 @@
   BOOST_TEST( ec.value() == 0 );
   econd = ec.default_error_condition();
   BOOST_TEST( econd.value() == 0 );
- BOOST_TEST( econd.category() == generic_category );
+ BOOST_TEST( econd.category() == generic_category() );
   BOOST_TEST( ec == errc::success );
- BOOST_TEST( ec.category() == system_category );
+ BOOST_TEST( ec.category() == system_category() );
   BOOST_TEST( std::strcmp( ec.category().name(), "system") == 0 );
- BOOST_TEST( !(ec < error_code( 0, system_category )) );
- BOOST_TEST( !(error_code( 0, system_category ) < ec) );
- BOOST_TEST( ec < error_code( 1, system_category ) );
- BOOST_TEST( !(error_code( 1, system_category ) < ec) );
+ BOOST_TEST( !(ec < error_code( 0, system_category() )) );
+ BOOST_TEST( !(error_code( 0, system_category() ) < ec) );
+ BOOST_TEST( ec < error_code( 1, system_category() ) );
+ BOOST_TEST( !(error_code( 1, system_category() ) < ec) );
 
- error_code ec_0_system( 0, system_category );
+ error_code ec_0_system( 0, system_category() );
   BOOST_TEST( !ec_0_system );
   BOOST_TEST( ec_0_system.value() == 0 );
   econd = ec_0_system.default_error_condition();
   BOOST_TEST( econd.value() == 0 );
- BOOST_TEST( econd.category() == generic_category );
+ BOOST_TEST( econd.category() == generic_category() );
   BOOST_TEST( ec_0_system == errc::success );
- BOOST_TEST( ec_0_system.category() == system_category );
+ BOOST_TEST( ec_0_system.category() == system_category() );
   BOOST_TEST( std::strcmp( ec_0_system.category().name(), "system") == 0 );
   check_ostream( ec_0_system, "system:0" );
 
   BOOST_TEST( ec_0_system == ec );
 
- error_code ec_1_system( 1, system_category );
+ error_code ec_1_system( 1, system_category() );
   BOOST_TEST( ec_1_system );
   BOOST_TEST( ec_1_system.value() == 1 );
   BOOST_TEST( ec_1_system.value() != 0 );
@@ -121,17 +121,17 @@
   BOOST_TEST( ec_0_system != ec_1_system );
   check_ostream( ec_1_system, "system:1" );
 
- ec = error_code( BOOST_ACCESS_ERROR_MACRO, system_category );
+ ec = error_code( BOOST_ACCESS_ERROR_MACRO, system_category() );
   BOOST_TEST( ec );
   BOOST_TEST( ec.value() == BOOST_ACCESS_ERROR_MACRO );
   econd = ec.default_error_condition();
   BOOST_TEST( econd.value() == static_cast<int>(errc::permission_denied) );
- BOOST_TEST( econd.category() == generic_category );
- BOOST_TEST( econd == error_condition( errc::permission_denied, generic_category ) );
+ BOOST_TEST( econd.category() == generic_category() );
+ BOOST_TEST( econd == error_condition( errc::permission_denied, generic_category() ) );
   BOOST_TEST( econd == errc::permission_denied );
   BOOST_TEST( errc::permission_denied == econd );
   BOOST_TEST( ec == errc::permission_denied );
- BOOST_TEST( ec.category() == system_category );
+ BOOST_TEST( ec.category() == system_category() );
   BOOST_TEST( std::strcmp( ec.category().name(), "system") == 0 );
 
   // test the explicit make_error_code conversion for errc
@@ -141,17 +141,17 @@
   BOOST_TEST( errc::bad_message == ec );
   BOOST_TEST( ec != errc::permission_denied );
   BOOST_TEST( errc::permission_denied != ec );
- BOOST_TEST( ec.category() == generic_category );
+ BOOST_TEST( ec.category() == generic_category() );
 
   //// test the deprecated predefined error_category synonyms
- //BOOST_TEST( &system_category == &native_ecat );
- //BOOST_TEST( &generic_category == &errno_ecat );
- //BOOST_TEST( system_category == native_ecat );
- //BOOST_TEST( generic_category == errno_ecat );
+ //BOOST_TEST( &system_category() == &native_ecat );
+ //BOOST_TEST( &generic_category() == &errno_ecat );
+ //BOOST_TEST( system_category() == native_ecat );
+ //BOOST_TEST( generic_category() == errno_ecat );
 
   // test error_code and error_condition message();
   // see Boost.Filesystem operations_test for code specific message() tests
- ec = error_code( -1, system_category );
+ ec = error_code( -1, system_category() );
   std::cout << "error_code message for -1 is \"" << ec.message() << "\"\n";
   std::cout << "error_code message for 0 is \"" << ec_0_system.message() << "\"\n";
 #if defined(BOOST_WINDOWS_API)
@@ -169,11 +169,11 @@
   BOOST_TEST( ec.message() == "error -1" );
 #endif
 
- ec = error_code( BOOST_ACCESS_ERROR_MACRO, system_category );
+ ec = error_code( BOOST_ACCESS_ERROR_MACRO, system_category() );
   BOOST_TEST( ec.message() != "" );
   BOOST_TEST( ec.message().substr( 0, 13) != "Unknown error" );
 
- econd = error_condition( -1, generic_category );
+ econd = error_condition( -1, generic_category() );
   error_condition econd_ok;
   std::cout << "error_condition message for -1 is \"" << econd.message() << "\"\n";
   std::cout << "error_condition message for 0 is \"" << econd_ok.message() << "\"\n";
@@ -192,7 +192,7 @@
   BOOST_TEST( econd.message() == "error -1" );
 #endif
 
- econd = error_condition( BOOST_ACCESS_ERROR_MACRO, generic_category );
+ econd = error_condition( BOOST_ACCESS_ERROR_MACRO, generic_category() );
   BOOST_TEST( econd.message() != "" );
   BOOST_TEST( econd.message().substr( 0, 13) != "Unknown error" );
 
@@ -200,74 +200,74 @@
   std::cout << "Windows tests...\n";
   // these tests probe the Windows errc decoder
   // test the first entry in the decoder table:
- ec = error_code( ERROR_ACCESS_DENIED, system_category );
+ ec = error_code( ERROR_ACCESS_DENIED, system_category() );
   BOOST_TEST( ec.value() == ERROR_ACCESS_DENIED );
   BOOST_TEST( ec == errc::permission_denied );
   BOOST_TEST( ec.default_error_condition().value() == errc::permission_denied );
- BOOST_TEST( ec.default_error_condition().category() == generic_category );
+ BOOST_TEST( ec.default_error_condition().category() == generic_category() );
 
   // test the second entry in the decoder table:
- ec = error_code( ERROR_ALREADY_EXISTS, system_category );
+ ec = error_code( ERROR_ALREADY_EXISTS, system_category() );
   BOOST_TEST( ec.value() == ERROR_ALREADY_EXISTS );
   BOOST_TEST( ec == errc::file_exists );
   BOOST_TEST( ec.default_error_condition().value() == errc::file_exists );
- BOOST_TEST( ec.default_error_condition().category() == generic_category );
+ BOOST_TEST( ec.default_error_condition().category() == generic_category() );
 
   // test the third entry in the decoder table:
- ec = error_code( ERROR_BAD_UNIT, system_category );
+ ec = error_code( ERROR_BAD_UNIT, system_category() );
   BOOST_TEST( ec.value() == ERROR_BAD_UNIT );
   BOOST_TEST( ec == errc::no_such_device );
   BOOST_TEST( ec.default_error_condition().value() == errc::no_such_device );
- BOOST_TEST( ec.default_error_condition().category() == generic_category );
+ BOOST_TEST( ec.default_error_condition().category() == generic_category() );
 
   // test the last non-Winsock entry in the decoder table:
- ec = error_code( ERROR_WRITE_PROTECT, system_category );
+ ec = error_code( ERROR_WRITE_PROTECT, system_category() );
   BOOST_TEST( ec.value() == ERROR_WRITE_PROTECT );
   BOOST_TEST( ec == errc::permission_denied );
   BOOST_TEST( ec.default_error_condition().value() == errc::permission_denied );
- BOOST_TEST( ec.default_error_condition().category() == generic_category );
+ BOOST_TEST( ec.default_error_condition().category() == generic_category() );
 
   // test the last Winsock entry in the decoder table:
- ec = error_code( WSAEWOULDBLOCK, system_category );
+ ec = error_code( WSAEWOULDBLOCK, system_category() );
   BOOST_TEST( ec.value() == WSAEWOULDBLOCK );
   BOOST_TEST( ec == errc::operation_would_block );
   BOOST_TEST( ec.default_error_condition().value() == errc::operation_would_block );
- BOOST_TEST( ec.default_error_condition().category() == generic_category );
+ BOOST_TEST( ec.default_error_condition().category() == generic_category() );
 
   // test not-in-table condition:
- ec = error_code( 1234567890, system_category );
+ ec = error_code( 1234567890, system_category() );
   BOOST_TEST( ec.value() == 1234567890 );
   BOOST_TEST( ec.default_error_condition().value() == 1234567890 );
- BOOST_TEST( ec.default_error_condition().category() == system_category );
+ BOOST_TEST( ec.default_error_condition().category() == system_category() );
 
 #else // POSIX
 
   std::cout << "POSIX tests...\n";
- ec = error_code( EACCES, system_category );
- BOOST_TEST( ec == error_code( errc::permission_denied, system_category ) );
- BOOST_TEST( error_code( errc::permission_denied, system_category ) == ec );
+ ec = error_code( EACCES, system_category() );
+ BOOST_TEST( ec == error_code( errc::permission_denied, system_category() ) );
+ BOOST_TEST( error_code( errc::permission_denied, system_category() ) == ec );
   BOOST_TEST( ec == errc::permission_denied );
   BOOST_TEST( errc::permission_denied == ec );
   BOOST_TEST( ec.default_error_condition().value() == errc::permission_denied );
- BOOST_TEST( ec.default_error_condition().category() == generic_category );
+ BOOST_TEST( ec.default_error_condition().category() == generic_category() );
 
 # ifdef __CYGWIN__
 
   std::cout << "Cygwin tests...\n";
   ec = cygwin_error::no_package;
   BOOST_TEST( ec == cygwin_error::no_package );
- BOOST_TEST( ec == error_code( ENOPKG, system_category ) );
- BOOST_TEST( ec == error_code( cygwin_error::no_package, system_category ) );
- BOOST_TEST( ec.default_error_condition().category() == system_category );
+ BOOST_TEST( ec == error_code( ENOPKG, system_category() ) );
+ BOOST_TEST( ec == error_code( cygwin_error::no_package, system_category() ) );
+ BOOST_TEST( ec.default_error_condition().category() == system_category() );
 
 # elif defined(linux) || defined(__linux) || defined(__linux__)
 
   std::cout << "Linux tests...\n";
   ec = linux_error::dot_dot_error;
   BOOST_TEST( ec == linux_error::dot_dot_error );
- BOOST_TEST( ec == error_code( EDOTDOT, system_category ) );
- BOOST_TEST( ec == error_code( linux_error::dot_dot_error, system_category ) );
- BOOST_TEST( ec.default_error_condition().category() == system_category );
+ BOOST_TEST( ec == error_code( EDOTDOT, system_category() ) );
+ BOOST_TEST( ec == error_code( linux_error::dot_dot_error, system_category() ) );
+ BOOST_TEST( ec.default_error_condition().category() == system_category() );
 
 # endif
 

Modified: trunk/libs/system/test/error_code_user_test.cpp
==============================================================================
--- trunk/libs/system/test/error_code_user_test.cpp (original)
+++ trunk/libs/system/test/error_code_user_test.cpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -14,6 +14,8 @@
 
 // Motivation was a Boost posting by Christopher Kohlhoff on June 28, 2006.
 
+#define BOOST_SYSTEM_NO_DEPRECATED
+
 #include <boost/system/error_code.hpp>
 #include <boost/cerrno.hpp>
 #include <string>
@@ -40,7 +42,7 @@
 # else
       ::CreateDirectoryA( path.c_str(), 0 ) != 0 ? 0 : ::GetLastError(),
 # endif
- boost::system::system_category );
+ boost::system::system_category() );
 }
 
 // ------------------------------------------------------------------------ //
@@ -53,9 +55,9 @@
 {
   return boost::system::error_code(
     std::remove( path.c_str() ) == 0 ? 0 : errno,
- boost::system::posix_category ); // OK for both Windows and POSIX
- // Alternatively, could use posix_category
- // on Windows and system_category on
+ boost::system::generic_category() ); // OK for both Windows and POSIX
+ // Alternatively, could use generic_category()
+ // on Windows and system_category() on
                                      // POSIX-based systems.
 }
 
@@ -118,8 +120,8 @@
       boost::system::error_condition default_error_condition( int ev ) const
       {
         return ev == boo_boo
- ? boost::system::error_condition( boost::system::posix::io_error,
- boost::system::posix_category )
+ ? boost::system::error_condition( boost::system::errc::io_error,
+ boost::system::generic_category() )
           : boost::system::error_condition( ev,
               boost::lib3::lib3_error_category );
       }
@@ -180,8 +182,8 @@
     boost::system::error_condition default_error_condition( int ev ) const
     {
       return ev == boo_boo.value()
- ? boost::system::error_condition( boost::system::posix::io_error,
- boost::system::posix_category )
+ ? boost::system::error_condition( boost::system::errc::io_error,
+ boost::system::generic_category() )
         : boost::system::error_condition( ev, lib4::lib4_error_category );
     }
     
@@ -237,15 +239,15 @@
 // switch (ev)
 // {
 // case user_success:
-// return boost::system::error_code(boost::system::posix::success, boost::system::posix_category);
+// return boost::system::error_code(boost::system::errc::success, boost::system::generic_category());
 // case user_permission_denied:
-// return boost::system::error_code(boost::system::posix::permission_denied, boost::system::posix_category);
+// return boost::system::error_code(boost::system::errc::permission_denied, boost::system::generic_category());
 // case user_out_of_memory:
-// return boost::system::error_code(boost::system::posix::not_enough_memory, boost::system::posix_category);
+// return boost::system::error_code(boost::system::errc::not_enough_memory, boost::system::generic_category());
 // default:
 // break;
 // }
-// return boost::system::error_code(boost::system::posix::no_posix_equivalent, boost::system::posix_category);
+// return boost::system::error_code(boost::system::errc::no_posix_equivalent, boost::system::generic_category());
 // }
 //
 // };
@@ -264,8 +266,8 @@
 //
 // void check_success(const boost::system::error_code& ec, bool expect)
 // {
-// BOOST_TEST( (ec == boost::system::posix::success) == expect );
-// if (ec == boost::system::posix::success)
+// BOOST_TEST( (ec == boost::system::errc::success) == expect );
+// if (ec == boost::system::errc::success)
 // std::cout << "yes... " << (expect ? "ok" : "fail") << '\n';
 // else
 // std::cout << "no... " << (expect ? "fail" : "ok") << '\n';
@@ -273,8 +275,8 @@
 //
 // void check_permission_denied(const boost::system::error_code& ec, bool expect)
 // {
-// BOOST_TEST( (ec == boost::system::posix::permission_denied) == expect );
-// if (ec == boost::system::posix::permission_denied)
+// BOOST_TEST( (ec == boost::system::errc::permission_denied) == expect );
+// if (ec == boost::system::errc::permission_denied)
 // std::cout << "yes... " << (expect ? "ok" : "fail") << '\n';
 // else
 // std::cout << "no... " << (expect ? "fail" : "ok") << '\n';
@@ -282,8 +284,8 @@
 //
 // void check_out_of_memory(const boost::system::error_code& ec, bool expect)
 // {
-// BOOST_TEST( (ec == boost::system::posix::not_enough_memory) == expect );
-// if (ec == boost::system::posix::not_enough_memory)
+// BOOST_TEST( (ec == boost::system::errc::not_enough_memory) == expect );
+// if (ec == boost::system::errc::not_enough_memory)
 // std::cout << "yes... " << (expect ? "ok" : "fail") << '\n';
 // else
 // std::cout << "no... " << (expect ? "fail" : "ok") << '\n';
@@ -295,23 +297,23 @@
 // printf("=====\n");
 // boost::system::error_code ec;
 // check_success(ec, true);
-// check_success(boost::system::posix::success, true);
-// check_success(boost::system::posix::permission_denied, false);
-// check_success(boost::system::posix::not_enough_memory, false);
+// check_success(boost::system::errc::success, true);
+// check_success(boost::system::errc::permission_denied, false);
+// check_success(boost::system::errc::not_enough_memory, false);
 // check_success(user_success, true);
 // check_success(user_permission_denied, false);
 // check_success(user_out_of_memory, false);
 // check_permission_denied(ec, false);
-// check_permission_denied(boost::system::posix::success, false);
-// check_permission_denied(boost::system::posix::permission_denied, true);
-// check_permission_denied(boost::system::posix::not_enough_memory, false);
+// check_permission_denied(boost::system::errc::success, false);
+// check_permission_denied(boost::system::errc::permission_denied, true);
+// check_permission_denied(boost::system::errc::not_enough_memory, false);
 // check_permission_denied(user_success, false);
 // check_permission_denied(user_permission_denied, true);
 // check_permission_denied(user_out_of_memory, false);
 // check_out_of_memory(ec, false);
-// check_out_of_memory(boost::system::posix::success, false);
-// check_out_of_memory(boost::system::posix::permission_denied, false);
-// check_out_of_memory(boost::system::posix::not_enough_memory, true);
+// check_out_of_memory(boost::system::errc::success, false);
+// check_out_of_memory(boost::system::errc::permission_denied, false);
+// check_out_of_memory(boost::system::errc::not_enough_memory, true);
 // check_out_of_memory(user_success, false);
 // check_out_of_memory(user_permission_denied, false);
 // check_out_of_memory(user_out_of_memory, true);
@@ -347,8 +349,8 @@
   std::cout << "ec.value() is " << ec.value() << '\n';
 
   BOOST_TEST( ec );
- BOOST_TEST( ec == boost::system::posix::no_such_file_or_directory );
- BOOST_TEST( ec.category() == boost::system::system_category );
+ BOOST_TEST( ec == boost::system::errc::no_such_file_or_directory );
+ BOOST_TEST( ec.category() == boost::system::system_category() );
 
   // Library 2 tests:
 
@@ -356,8 +358,8 @@
   std::cout << "ec.value() is " << ec.value() << '\n';
 
   BOOST_TEST( ec );
- BOOST_TEST( ec == boost::system::posix::no_such_file_or_directory );
- BOOST_TEST( ec.category() == boost::system::posix_category );
+ BOOST_TEST( ec == boost::system::errc::no_such_file_or_directory );
+ BOOST_TEST( ec.category() == boost::system::generic_category() );
 
   // Library 3 tests:
 
@@ -369,7 +371,7 @@
   BOOST_TEST( ec.value() == boost::lib3::boo_boo );
   BOOST_TEST( ec.category() == boost::lib3::lib3_error_category );
 
- BOOST_TEST( ec == boost::system::posix::io_error );
+ BOOST_TEST( ec == boost::system::errc::io_error );
 
   boost::system::error_code ec3( boost::lib3::boo_boo+100,
     boost::lib3::lib3_error_category );
@@ -387,7 +389,7 @@
   BOOST_TEST( ec.value() == lib4::boo_boo.value() );
   BOOST_TEST( ec.category() == lib4::lib4_error_category );
 
- BOOST_TEST( ec == boost::system::posix::io_error );
+ BOOST_TEST( ec == boost::system::errc::io_error );
 
   boost::system::error_code ec4( lib4::boo_boo.value()+100,
     lib4::lib4_error_category );

Modified: trunk/libs/system/test/header_only_test.cpp
==============================================================================
--- trunk/libs/system/test/header_only_test.cpp (original)
+++ trunk/libs/system/test/header_only_test.cpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -18,6 +18,6 @@
 
 int main( int, char*[] )
 {
- boost::system::error_code ec( 0, boost::system::system_category );
+ boost::system::error_code ec( 0, boost::system::system_category() );
   return ::boost::report_errors();
 }

Modified: trunk/libs/system/test/initialization_test.cpp
==============================================================================
--- trunk/libs/system/test/initialization_test.cpp (original)
+++ trunk/libs/system/test/initialization_test.cpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -24,5 +24,5 @@
 
 int main( int, char ** )
 {
- return 0;
+ return ::boost::report_errors();
 }

Modified: trunk/libs/system/test/system_error_test.cpp
==============================================================================
--- trunk/libs/system/test/system_error_test.cpp (original)
+++ trunk/libs/system/test/system_error_test.cpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -37,7 +37,7 @@
   {
     std::cout << "test " << desc << "\n what() returns \"" << ex.what() << "\"\n";
     BOOST_TEST( ex.code().value() == v );
- BOOST_TEST( ex.code().category() == system_category );
+ BOOST_TEST( ex.code().category() == system_category() );
 # ifdef BOOST_WINDOWS_API
     LANGID language_id;
 # if !defined(__MINGW32__) && !defined(__CYGWIN__)
@@ -63,25 +63,25 @@
 {
   // all constructors, in the same order as they appear in the header:
 
- system_error c1_0( error_code(0, system_category) );
- system_error c1_1( error_code(1, system_category) );
- system_error c1_2u( error_code(uvalue, system_category) );
+ system_error c1_0( error_code(0, system_category()) );
+ system_error c1_1( error_code(1, system_category()) );
+ system_error c1_2u( error_code(uvalue, system_category()) );
 
- system_error c2_0( error_code(0, system_category), string("c2_0") );
- system_error c2_1( error_code(1, system_category), string("c2_1") );
+ system_error c2_0( error_code(0, system_category()), string("c2_0") );
+ system_error c2_1( error_code(1, system_category()), string("c2_1") );
 
- system_error c3_0( error_code(0, system_category), "c3_0" );
- system_error c3_1( error_code(1, system_category), "c3_1" );
+ system_error c3_0( error_code(0, system_category()), "c3_0" );
+ system_error c3_1( error_code(1, system_category()), "c3_1" );
 
- system_error c4_0( 0, system_category );
- system_error c4_1( 1, system_category );
- system_error c4_2u( uvalue, system_category );
+ system_error c4_0( 0, system_category() );
+ system_error c4_1( 1, system_category() );
+ system_error c4_2u( uvalue, system_category() );
 
- system_error c5_0( 0, system_category, string("c5_0") );
- system_error c5_1( 1, system_category, string("c5_1") );
+ system_error c5_0( 0, system_category(), string("c5_0") );
+ system_error c5_1( 1, system_category(), string("c5_1") );
 
- system_error c6_0( 0, system_category, "c6_0" );
- system_error c6_1( 1, system_category, "c6_1" );
+ system_error c6_0( 0, system_category(), "c6_0" );
+ system_error c6_1( 1, system_category(), "c6_1" );
 
   TEST( c1_0, 0, "The operation completed successfully" );
   TEST( c1_1, 1, "Incorrect function" );

Modified: trunk/libs/system/test/throw_test.cpp
==============================================================================
--- trunk/libs/system/test/throw_test.cpp (original)
+++ trunk/libs/system/test/throw_test.cpp 2010-05-30 11:38:32 EDT (Sun, 30 May 2010)
@@ -25,7 +25,7 @@
   {
     BOOST_SYSTEM_DECL void throw_test()
     {
- throw system_error(9999, get_system_category(), "boo boo");
+ throw system_error(9999, system_category(), "boo boo");
     }
   }
 }


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