mirror of
https://github.com/boostorg/system.git
synced 2025-07-30 04:27:14 +02:00
Add BOOST_SYSTEM_DEPRECATED; mark deprecated categories
This commit is contained in:
@ -48,4 +48,18 @@
|
|||||||
# define BOOST_SYSTEM_CONSTEXPR
|
# define BOOST_SYSTEM_CONSTEXPR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// BOOST_SYSTEM_DEPRECATED
|
||||||
|
|
||||||
|
#if defined(__clang__)
|
||||||
|
# define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
# if __GNUC__ * 100 + __GNUC_MINOR__ >= 405
|
||||||
|
# define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
|
||||||
|
# else
|
||||||
|
# define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated))
|
||||||
|
# endif
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
# define BOOST_SYSTEM_DEPRECATED(msg) __declspec(deprecated(msg))
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
|
#endif // BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
|
||||||
|
@ -109,10 +109,10 @@ inline error_category const & generic_category() BOOST_NOEXCEPT
|
|||||||
|
|
||||||
#ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
|
#ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
|
||||||
|
|
||||||
inline const error_category & get_generic_category() { return generic_category(); }
|
BOOST_SYSTEM_DEPRECATED("please use generic_category()") inline const error_category & get_generic_category() { return generic_category(); }
|
||||||
inline const error_category & get_posix_category() { return generic_category(); }
|
BOOST_SYSTEM_DEPRECATED("please use generic_category()") inline const error_category & get_posix_category() { return generic_category(); }
|
||||||
static const error_category & posix_category BOOST_ATTRIBUTE_UNUSED = generic_category();
|
BOOST_SYSTEM_DEPRECATED("please use generic_category()") static const error_category & posix_category BOOST_ATTRIBUTE_UNUSED = generic_category();
|
||||||
static const error_category & errno_ecat BOOST_ATTRIBUTE_UNUSED = generic_category();
|
BOOST_SYSTEM_DEPRECATED("please use generic_category()") static const error_category & errno_ecat BOOST_ATTRIBUTE_UNUSED = generic_category();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -98,8 +98,8 @@ inline error_category const & system_category() BOOST_NOEXCEPT
|
|||||||
|
|
||||||
#ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
|
#ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
|
||||||
|
|
||||||
inline const error_category & get_system_category() { return system_category(); }
|
BOOST_SYSTEM_DEPRECATED("please use system_category()") inline const error_category & get_system_category() { return system_category(); }
|
||||||
static const error_category & native_ecat BOOST_ATTRIBUTE_UNUSED = system_category();
|
BOOST_SYSTEM_DEPRECATED("please use system_category()") static const error_category & native_ecat BOOST_ATTRIBUTE_UNUSED = system_category();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user