fix build with exceptions disabled

This commit is contained in:
arvidn 2017-05-28 00:17:36 -04:00 committed by Arvid Norberg
parent 353ab20280
commit 77dcc5363f
2 changed files with 8 additions and 8 deletions

View File

@ -40,14 +40,15 @@ POSSIBILITY OF SUCH DAMAGE.
namespace libtorrent { namespace aux {
template <typename T, typename... Args>
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>(args)...);
#endif
}
#else
void TORRENT_NO_RETURN throw_ex(Args&&... args) {
throw T(std::forward<Args>(args)...);
}
#endif
}}
#endif

View File

@ -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(); }