diff --git a/include/libtorrent/aux_/throw.hpp b/include/libtorrent/aux_/throw.hpp index f653fe01d..f43f954f2 100644 --- a/include/libtorrent/aux_/throw.hpp +++ b/include/libtorrent/aux_/throw.hpp @@ -40,14 +40,15 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { namespace aux { template - void TORRENT_NO_RETURN throw_ex(Args&&... args) - { #ifdef BOOST_NO_EXCEPTIONS + void TORRENT_NO_RETURN throw_ex(Args&&...) { std::terminate(); -#else - throw T(std::forward(args)...); -#endif } +#else + void TORRENT_NO_RETURN throw_ex(Args&&... args) { + throw T(std::forward(args)...); + } +#endif }} #endif diff --git a/include/libtorrent/error_code.hpp b/include/libtorrent/error_code.hpp index 56fabce5c..9589070bb 100644 --- a/include/libtorrent/error_code.hpp +++ b/include/libtorrent/error_code.hpp @@ -483,12 +483,11 @@ namespace libtorrent { using boost::system::generic_category; using boost::system::system_category; -#ifndef BOOST_NO_EXCEPTIONS using boost::system::system_error; -#ifndef TORRENT_NO_DEPRECATE - using system_error = boost::system::system_error; +#ifndef BOOST_NO_EXCEPTIONS +#ifndef TORRENT_NO_DEPRECATE TORRENT_DEPRECATED inline boost::system::error_category& get_libtorrent_category() { return libtorrent_category(); }