mirror of
https://github.com/boostorg/system.git
synced 2025-07-29 20:17:13 +02:00
Merge pull request #18 from boostorg/pr/remove-no-deprecated
Replace BOOST_SYSTEM_NO_DEPRECATED with BOOST_SYSTEM_ENABLE_DEPRECATED
This commit is contained in:
@ -80,7 +80,7 @@ noexcept</code> and explicit conversion operators. The actual implementation
|
||||
uses C++11 features only when they are available, and otherwise falls back on
|
||||
C++03 features.</p>
|
||||
<h2><a name="Macros">Macros</a></h2>
|
||||
<p>Users may defined the following macros if desired. Sensible defaults are
|
||||
<p>Users may define 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" height="368">
|
||||
<tr>
|
||||
@ -109,17 +109,16 @@ provided, so users may ignore these macros if they prefer.</p>
|
||||
facility.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" height="32"><code>BOOST_SYSTEM_NO_DEPRECATED</code></td>
|
||||
<td valign="top" height="32"><code>BOOST_SYSTEM_ENABLE_DEPRECATED</code></td>
|
||||
<td valign="top" height="32">Not defined.</td>
|
||||
<td valign="top" height="32">Deprecated features are excluded.</td>
|
||||
<td valign="top" height="32">Deprecated features are provided for compatibility.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a name="Deprecated-names">Deprecated names</a></h2>
|
||||
<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>
|
||||
<p>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
|
||||
<code>BOOST_SYSTEM_ENABLE_DEPRECATED</code> is defined.</p>
|
||||
<table border="1" cellpadding="5" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111">
|
||||
<tr>
|
||||
<td><b><i>Old usage, now deprecated</i></b></td>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -89,7 +89,7 @@ namespace boost
|
||||
};
|
||||
} // namespace linux_error
|
||||
|
||||
# ifndef BOOST_SYSTEM_NO_DEPRECATED
|
||||
# ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
|
||||
namespace Linux = linux_error;
|
||||
# endif
|
||||
|
||||
|
@ -107,7 +107,7 @@ namespace boost
|
||||
|
||||
} // namespace windows
|
||||
|
||||
# ifndef BOOST_SYSTEM_NO_DEPRECATED
|
||||
# ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
|
||||
namespace windows = windows_error;
|
||||
# endif
|
||||
|
||||
|
@ -9,9 +9,6 @@
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// test without deprecated features
|
||||
#define BOOST_SYSTEM_NO_DEPRECATED
|
||||
|
||||
#include <boost/config/warning_disable.hpp>
|
||||
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
@ -14,8 +14,6 @@
|
||||
|
||||
// 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>
|
||||
|
@ -18,7 +18,7 @@ struct foo
|
||||
foo()
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
ec == boost::system::posix::permission_denied;
|
||||
ec == boost::system::errc::permission_denied;
|
||||
}
|
||||
} f;
|
||||
|
||||
|
@ -9,9 +9,6 @@
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// test without deprecated features
|
||||
#define BOOST_SYSTEM_NO_DEPRECATED
|
||||
|
||||
#include <boost/config/warning_disable.hpp>
|
||||
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
Reference in New Issue
Block a user