From 829a1320a7bef3ade74d6691fdcfe72e0b6917e9 Mon Sep 17 00:00:00 2001
From: Peter Dimov
Users may defined the following macros if desired. Sensible defaults are +
Users may define the following macros if desired. Sensible defaults are provided, so users may ignore these macros if they prefer.
BOOST_SYSTEM_NO_DEPRECATED |
+ BOOST_SYSTEM_ENABLE_DEPRECATED |
Not defined. | -Deprecated features are excluded. | +Deprecated features are provided for compatibility. |
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 BOOST_SYSTEM_NO_DEPRECATED
-is defined.
In the process of adding Boost.System to the C++11 standard library, the
+C++ committee changed some names. To ease transition, Boost.System deprecates
+the old names, but will provide them when the macro
+BOOST_SYSTEM_ENABLE_DEPRECATED
is defined.
Old usage, now deprecated | diff --git a/include/boost/system/detail/error_code.ipp b/include/boost/system/detail/error_code.ipp index dec55d3..99d0892 100644 --- a/include/boost/system/detail/error_code.ipp +++ b/include/boost/system/detail/error_code.ipp @@ -452,7 +452,7 @@ namespace } // unnamed namespace -# ifndef BOOST_SYSTEM_NO_DEPRECATED +# ifdef BOOST_SYSTEM_ENABLE_DEPRECATED 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 diff --git a/include/boost/system/error_code.hpp b/include/boost/system/error_code.hpp index 080bb27..8041d5d 100644 --- a/include/boost/system/error_code.hpp +++ b/include/boost/system/error_code.hpp @@ -144,7 +144,7 @@ namespace boost } // namespace errc -# ifndef BOOST_SYSTEM_NO_DEPRECATED +# ifdef BOOST_SYSTEM_ENABLE_DEPRECATED namespace posix = errc; namespace posix_error = errc; # endif @@ -198,7 +198,7 @@ namespace boost #endif // deprecated synonyms ------------------------------------------------------------// -#ifndef BOOST_SYSTEM_NO_DEPRECATED +#ifdef BOOST_SYSTEM_ENABLE_DEPRECATED 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(); } @@ -533,7 +533,7 @@ namespace boost }; // predefined error_code object used as "throw on error" tag -# ifndef BOOST_SYSTEM_NO_DEPRECATED +# ifdef BOOST_SYSTEM_ENABLE_DEPRECATED BOOST_SYSTEM_DECL extern error_code throws; # endif diff --git a/include/boost/system/linux_error.hpp b/include/boost/system/linux_error.hpp index 0873a7c..d02ce29 100644 --- a/include/boost/system/linux_error.hpp +++ b/include/boost/system/linux_error.hpp @@ -89,7 +89,7 @@ namespace boost }; } // namespace linux_error -# ifndef BOOST_SYSTEM_NO_DEPRECATED +# ifdef BOOST_SYSTEM_ENABLE_DEPRECATED namespace Linux = linux_error; # endif diff --git a/include/boost/system/windows_error.hpp b/include/boost/system/windows_error.hpp index 0fb7ea6..c6e0aad 100644 --- a/include/boost/system/windows_error.hpp +++ b/include/boost/system/windows_error.hpp @@ -107,7 +107,7 @@ namespace boost } // namespace windows -# ifndef BOOST_SYSTEM_NO_DEPRECATED +# ifdef BOOST_SYSTEM_ENABLE_DEPRECATED namespace windows = windows_error; # endif diff --git a/test/error_code_test.cpp b/test/error_code_test.cpp index baf3853..7965541 100644 --- a/test/error_code_test.cpp +++ b/test/error_code_test.cpp @@ -9,9 +9,6 @@ //----------------------------------------------------------------------------// -// test without deprecated features -#define BOOST_SYSTEM_NO_DEPRECATED - #include