diff --git a/ChangeLog b/ChangeLog index 9a703a6e2..070be252f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ + * removed deprecated handle_alert template * enable logging build config by default (but alert mask disabled by default) * deprecated RSS API * experimental support for BEP 38, "mutable torrents" diff --git a/include/libtorrent/alert.hpp b/include/libtorrent/alert.hpp index b1ec7b1f8..f4fd26dae 100644 --- a/include/libtorrent/alert.hpp +++ b/include/libtorrent/alert.hpp @@ -267,70 +267,6 @@ namespace libtorrent { time_point m_timestamp; }; - // TODO: 3 delete this functionality -#ifndef BOOST_NO_EXCEPTIONS -#ifndef TORRENT_NO_DEPRECATE - struct TORRENT_DEPRECATED TORRENT_EXPORT unhandled_alert : std::exception - { - unhandled_alert() {} - }; - -#ifndef BOOST_NO_TYPEID - - namespace detail { - - struct void_; - - template - TORRENT_DEPRECATED - void handle_alert_dispatch( - const std::auto_ptr& alert_, const Handler& handler - , const std::type_info& typeid_ - , T0*, BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS(TORRENT_MAX_ALERT_TYPES, T, *p)) - { - if (typeid_ == typeid(T0)) - handler(*static_cast(alert_.get())); - else - handle_alert_dispatch(alert_, handler, typeid_ - , BOOST_PP_ENUM_SHIFTED_PARAMS( - TORRENT_MAX_ALERT_TYPES, p), reinterpret_cast(0)); - } - - template - TORRENT_DEPRECATED - void handle_alert_dispatch( - const std::auto_ptr& - , const Handler& - , const std::type_info& - , BOOST_PP_ENUM_PARAMS(TORRENT_MAX_ALERT_TYPES, void_* BOOST_PP_INTERCEPT)) - { - throw unhandled_alert(); - } - - } // namespace detail - - template - struct TORRENT_DEPRECATED TORRENT_EXPORT handle_alert - { - template - handle_alert(const std::auto_ptr& alert_ - , const Handler& handler) - { - #define ALERT_POINTER_TYPE(z, n, text) reinterpret_cast(0) - - detail::handle_alert_dispatch(alert_, handler, typeid(*alert_) - , BOOST_PP_ENUM(TORRENT_MAX_ALERT_TYPES, ALERT_POINTER_TYPE, _)); - - #undef ALERT_POINTER_TYPE - } - }; - -#endif // BOOST_NO_TYPEID -#endif // TORRENT_NO_DEPRECATE -#endif // BOOST_NO_EXCEPTIONS - // When you get an alert, you can use ``alert_cast<>`` to attempt to cast the pointer to a // more specific alert type, in order to query it for more information. template