Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion asio/include/asio/basic_deadline_timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace asio {
template <typename Time,
typename TimeTraits = asio::time_traits<Time>,
typename Executor = any_io_executor>
class basic_deadline_timer
class ASIO_DEPRECATED_X("Use basic_waitable_timer") basic_deadline_timer
{
private:
class initiate_async_wait;
Expand Down
6 changes: 3 additions & 3 deletions asio/include/asio/basic_io_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace detail
{
// Type trait used to determine whether a service supports move.
template <typename IoObjectService>
class service_has_move
class ASIO_DEPRECATED service_has_move
{
private:
typedef IoObjectService service_type;
Expand Down Expand Up @@ -60,7 +60,7 @@ template <typename IoObjectService>
template <typename IoObjectService,
bool Movable = detail::service_has_move<IoObjectService>::value>
#endif
class basic_io_object
class ASIO_DEPRECATED basic_io_object
{
public:
/// The type of the service that will be used to provide I/O operations.
Expand Down Expand Up @@ -190,7 +190,7 @@ class basic_io_object

// Specialisation for movable objects.
template <typename IoObjectService>
class basic_io_object<IoObjectService, true>
class ASIO_DEPRECATED basic_io_object<IoObjectService, true>
{
public:
typedef IoObjectService service_type;
Expand Down
4 changes: 3 additions & 1 deletion asio/include/asio/buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ class const_buffer
/// (Deprecated: Use the socket/descriptor wait() and async_wait() member
/// functions.) An implementation of both the ConstBufferSequence and
/// MutableBufferSequence concepts to represent a null buffer sequence.
class null_buffers
class ASIO_DEPRECATED_X(
"Use the socket/descriptor wait() and async_wait() member functions")
null_buffers
{
public:
/// The type for each element in the list of buffers.
Expand Down
1 change: 1 addition & 0 deletions asio/include/asio/deadline_timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace asio {

/// (Deprecated: Use system_timer.) Typedef for the typical usage of timer. Uses
/// a UTC clock.
ASIO_DEPRECATED_X("Use system_timer")
typedef basic_deadline_timer<boost::posix_time::ptime> deadline_timer;

} // namespace asio
Expand Down
14 changes: 14 additions & 0 deletions asio/include/asio/detail/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,20 @@
# define ASIO_NODISCARD
#endif // !defined(ASIO_NODISCARD)

// Compiler support for the the [[deprecated(msg)]] attribute.
#if !defined(ASIO_DEPRECATED)
# if defined(__has_cpp_attribute)
# if __has_cpp_attribute(deprecated) && !defined(ASIO_IGNORE_DEPRECATED)
# define ASIO_DEPRECATED [[deprecated]]
# define ASIO_DEPRECATED_X(msg) [[deprecated(msg)]]
# endif // __has_cpp_attribute(deprecated)
# endif // defined(__has_cpp_attribute)
#endif // !defined(ASIO_DEPRECATED)
#if !defined(ASIO_DEPRECATED)
# define ASIO_DEPRECATED
# define ASIO_DEPRECATED_X(msg)
#endif // !defined(ASIO_DEPRECATED)

// Kernel support for MSG_NOSIGNAL.
#if !defined(ASIO_HAS_MSG_NOSIGNAL)
# if defined(__linux__)
Expand Down
5 changes: 5 additions & 0 deletions asio/include/asio/detail/push_options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@

# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
# if (__clang_major__ >= 6)
# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
# endif // (__clang_major__ >= 6)
Expand Down Expand Up @@ -106,6 +107,9 @@
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)
# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4)
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4)
# if (__GNUC__ >= 7)
# pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
# endif // (__GNUC__ >= 7)
Expand Down Expand Up @@ -184,6 +188,7 @@
# pragma warning (disable:4512)
# pragma warning (disable:4610)
# pragma warning (disable:4675)
# pragma warning (disable:4996)
# if (_MSC_VER < 1600)
// Visual Studio 2008 generates spurious warnings about unused parameters.
# pragma warning (disable:4100)
Expand Down
2 changes: 1 addition & 1 deletion asio/include/asio/detail/timer_queue_ptime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct forwarding_posix_time_traits : time_traits<boost::posix_time::ptime> {};

// Template specialisation for the commonly used instantiation.
template <>
class timer_queue<time_traits<boost::posix_time::ptime>>
class ASIO_DEPRECATED timer_queue<time_traits<boost::posix_time::ptime>>
: public timer_queue_base
{
public:
Expand Down
1 change: 1 addition & 0 deletions asio/include/asio/impl/execution_context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Service& make_service(execution_context& e, Args&&... args)
}

template <typename Service>
ASIO_DEPRECATED_X("Use make_service()")
inline void add_service(execution_context& e, Service* svc)
{
// Check that Service meets the necessary type requirements.
Expand Down
1 change: 1 addition & 0 deletions asio/include/asio/io_context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ class io_context
* boost::bind(f, a1, ... an)); @endcode
*/
template <typename Handler>
ASIO_DEPRECATED_X("Use asio::bind_executor()")
#if defined(GENERATING_DOCUMENTATION)
unspecified
#else
Expand Down
1 change: 1 addition & 0 deletions asio/include/asio/io_context_strand.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ class io_context::strand
* @code asio::dispatch(strand, boost::bind(f, a1, ... an)); @endcode
*/
template <typename Handler>
ASIO_DEPRECATED_X("Use asio::bind_executor()")
#if defined(GENERATING_DOCUMENTATION)
unspecified
#else
Expand Down
4 changes: 2 additions & 2 deletions asio/include/asio/time_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ namespace asio {

/// (Deprecated) Time traits suitable for use with the deadline timer.
template <typename Time>
struct time_traits;
struct ASIO_DEPRECATED time_traits;

/// (Deprecated) Time traits specialised for posix_time.
template <>
struct time_traits<boost::posix_time::ptime>
struct ASIO_DEPRECATED time_traits<boost::posix_time::ptime>
{
/// The time type.
typedef boost::posix_time::ptime time_type;
Expand Down