Added a BOOST_DEPRECATED macro for deprecated symbol markup.

BOOST_DEPRECATED can be used to mark functions, types and objects as
deprecated, with a message with a recommendation of replacement. Using
such marked symbols in code will generate compiler warnings, with the
specified message, if possible.

The warnings can be suppressed if BOOST_ALLOW_DEPRECATED_SYMBOLS is defined.
Additionally, added support BOOST_ALLOW_DEPRECATED macro that not only
allows for deprecated symbols but also deprecated headers (i.e. defining
BOOST_ALLOW_DEPRECATED is equivalent to defining both
BOOST_ALLOW_DEPRECATED_SYMBOLS and BOOST_ALLOW_DEPRECATED_HEADERS).
This commit is contained in:
Andrey Semashev committed 2022-08-14 16:15:51 +03:00
1 parent e0638d9865
commit a7a2d4ebf1
10 files changed
+140 -52

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@
#include <boost/config/pragma_message.hpp>
#if defined(BOOST_ALLOW_DEPRECATED_HEADERS)
#if defined(BOOST_ALLOW_DEPRECATED_HEADERS) || defined(BOOST_ALLOW_DEPRECATED)
# define BOOST_HEADER_DEPRECATED(a)
#else
# define BOOST_HEADER_DEPRECATED(a) BOOST_PRAGMA_MESSAGE("This header is deprecated. Use " a " instead.")