From b4b492b46e8a7471d19e146c3f88f6050b72f72b Mon Sep 17 00:00:00 2001 From: arvidn Date: Sun, 18 Feb 2024 02:26:48 +0100 Subject: [PATCH 1/4] fix user defined literal warning --- include/libtorrent/string_view.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libtorrent/string_view.hpp b/include/libtorrent/string_view.hpp index 53b93e00547..35f4c633979 100644 --- a/include/libtorrent/string_view.hpp +++ b/include/libtorrent/string_view.hpp @@ -19,7 +19,7 @@ using std::wstring_view; inline namespace literals { - constexpr string_view operator "" _sv(char const* str, std::size_t len) + constexpr string_view operator ""_sv(char const* str, std::size_t len) { return string_view(str, len); } } } From 57567527302f528f0a4d9b3e4e6ccabac0eb9919 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sun, 18 Feb 2024 10:58:53 +0100 Subject: [PATCH 2/4] disable deprecation warnings when building the python bindings --- bindings/python/Jamfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bindings/python/Jamfile b/bindings/python/Jamfile index 281ec247ca7..c145fde2890 100644 --- a/bindings/python/Jamfile +++ b/bindings/python/Jamfile @@ -280,7 +280,11 @@ my-python-extension libtorrent src/load_torrent.cpp : # requirements src + # the bindings will expose deprecated functions, so there's no point in + # warning about referencing them + msvc:/wd4996 gcc:-Wno-deprecated-declarations + clang:-Wno-deprecated-declarations darwin:-Wno-deprecated-declarations darwin:-Wno-unused-command-line-argument @libtorrent_linking From 97477f5fde9ca97b8760e7fcad0945b2f7886e39 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sun, 18 Feb 2024 10:45:57 +0100 Subject: [PATCH 3/4] disable auto_ptr in boost python build, to suppress warnings --- bindings/python/Jamfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bindings/python/Jamfile b/bindings/python/Jamfile index c145fde2890..74700865034 100644 --- a/bindings/python/Jamfile +++ b/bindings/python/Jamfile @@ -31,6 +31,9 @@ feature python-install-path : : free path ; # the python module in the system directory or user-specifc directory feature python-install-scope : user system : ; +feature auto-ptr : off on : composite propagated ; +feature.compose off : BOOST_NO_AUTO_PTR=1 ; + # copied from boost 1.63's boost python jamfile rule find-py3-version { @@ -298,6 +301,7 @@ my-python-extension libtorrent : # default-build all 17 + off : # usage-requirements false ; From b7ebe6cafc2ae9cd487601cfcd98ccae7e541828 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sun, 18 Feb 2024 11:01:34 +0100 Subject: [PATCH 4/4] disable cxx98 unary_function in boost-python, to avoid warning --- bindings/python/Jamfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bindings/python/Jamfile b/bindings/python/Jamfile index 74700865034..2f27ab846c6 100644 --- a/bindings/python/Jamfile +++ b/bindings/python/Jamfile @@ -34,6 +34,9 @@ feature python-install-scope : user system : ; feature auto-ptr : off on : composite propagated ; feature.compose off : BOOST_NO_AUTO_PTR=1 ; +feature cxx98-function-base : off on : composite propagated ; +feature.compose off : BOOST_NO_CXX98_FUNCTION_BASE=1 ; + # copied from boost 1.63's boost python jamfile rule find-py3-version { @@ -302,6 +305,7 @@ my-python-extension libtorrent all 17 off + off : # usage-requirements false ;