From b42fdd86349e237187ecaddb31b7597e8d2cdcc7 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sun, 15 Dec 2024 18:46:38 +0300 Subject: [PATCH] Remove remaining parts of Boost.Move --- .../dll/detail/posix/shared_library_impl.hpp | 2 ++ .../detail/windows/shared_library_impl.hpp | 2 ++ include/boost/dll/import_class.hpp | 29 ++++++++++--------- include/boost/dll/shared_library.hpp | 2 ++ include/boost/dll/smart_library.hpp | 2 +- 5 files changed, 22 insertions(+), 15 deletions(-) diff --git a/include/boost/dll/detail/posix/shared_library_impl.hpp b/include/boost/dll/detail/posix/shared_library_impl.hpp index 5dd204cb..a4396735 100644 --- a/include/boost/dll/detail/posix/shared_library_impl.hpp +++ b/include/boost/dll/detail/posix/shared_library_impl.hpp @@ -16,6 +16,8 @@ #include #include +#include // std::move + #include #include // strncmp #if !BOOST_OS_MACOS && !BOOST_OS_IOS && !BOOST_OS_QNX diff --git a/include/boost/dll/detail/windows/shared_library_impl.hpp b/include/boost/dll/detail/windows/shared_library_impl.hpp index 4f64b834..9298bd6c 100644 --- a/include/boost/dll/detail/windows/shared_library_impl.hpp +++ b/include/boost/dll/detail/windows/shared_library_impl.hpp @@ -18,6 +18,8 @@ #include +#include // std::move + #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif diff --git a/include/boost/dll/import_class.hpp b/include/boost/dll/import_class.hpp index f4cd3f8e..f5fa7704 100644 --- a/include/boost/dll/import_class.hpp +++ b/include/boost/dll/import_class.hpp @@ -15,6 +15,7 @@ #include #include #include +#include // std::move #if (__cplusplus < 201103L) && (!defined(_MSVC_LANG) || _MSVC_LANG < 201103L) # error This file requires C++11 at least! @@ -147,14 +148,14 @@ class imported_class static imported_class make(smart_library&& lib, Args...args) { typedef detail::sequence *seq; - return imported_class(seq(), boost::move(lib), static_cast(args)...); + return imported_class(seq(), std::move(lib), static_cast(args)...); } template static imported_class make(smart_library&& lib, std::size_t size, Args...args) { typedef detail::sequence *seq; - return imported_class(seq(), boost::move(lib), size, static_cast(args)...); + return imported_class(seq(), std::move(lib), size, static_cast(args)...); } template static imported_class make(const smart_library& lib, Args...args) @@ -340,7 +341,7 @@ imported_class::imported_class(detail::sequence *, const smart_libra template template imported_class::imported_class(detail::sequence *, smart_library && lib, Args...args) - : _lib(boost::move(lib)), + : _lib(std::move(lib)), _data(make_data(lib, static_cast(args)...)), _is_allocating(false), _size(0), @@ -352,7 +353,7 @@ imported_class::imported_class(detail::sequence *, smart_library && template template imported_class::imported_class(detail::sequence *, smart_library && lib, std::size_t size, Args...args) - : _lib(boost::move(lib)), + : _lib(std::move(lib)), _data(make_data(lib, size, static_cast(args)...)), _is_allocating(true), _size(size), @@ -427,7 +428,7 @@ import_class(const smart_library& lib_, std::size_t size, Args...args) { smart_library lib(lib_); - return imported_class::template make(boost::move(lib), size, static_cast(args)...); + return imported_class::template make(std::move(lib), size, static_cast(args)...); } //! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...) @@ -435,7 +436,7 @@ template imported_class import_class(const smart_library& lib_, Args...args) { smart_library lib(lib_); - return imported_class::template make(boost::move(lib), static_cast(args)...); + return imported_class::template make(std::move(lib), static_cast(args)...); } //! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...) @@ -444,7 +445,7 @@ import_class(const smart_library& lib_, const std::string & alias_name, Args...a { smart_library lib(lib_); lib.add_type_alias(alias_name); - return imported_class::template make(boost::move(lib), static_cast(args)...); + return imported_class::template make(std::move(lib), static_cast(args)...); } //! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...) @@ -454,7 +455,7 @@ import_class(const smart_library& lib_, std::size_t size, const std::string & al smart_library lib(lib_); lib.add_type_alias(alias_name); - return imported_class::template make(boost::move(lib), size, static_cast(args)...); + return imported_class::template make(std::move(lib), size, static_cast(args)...); } //! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...) @@ -464,14 +465,14 @@ import_class(const smart_library& lib_, const std::string & alias_name, std::siz smart_library lib(lib_); lib.add_type_alias(alias_name); - return imported_class::template make(boost::move(lib), size, static_cast(args)...); + return imported_class::template make(std::move(lib), size, static_cast(args)...); } //! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...) template imported_class import_class(smart_library && lib, Args...args) { - return imported_class::template make(boost::move(lib), static_cast(args)...); + return imported_class::template make(std::move(lib), static_cast(args)...); } //! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...) @@ -479,14 +480,14 @@ template imported_class import_class(smart_library && lib, const std::string & alias_name, Args...args) { lib.add_type_alias(alias_name); - return imported_class::template make(boost::move(lib), static_cast(args)...); + return imported_class::template make(std::move(lib), static_cast(args)...); } //! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...) template imported_class import_class(smart_library && lib, std::size_t size, Args...args) { - return imported_class::template make(boost::move(lib), size, static_cast(args)...); + return imported_class::template make(std::move(lib), size, static_cast(args)...); } //! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...) @@ -494,7 +495,7 @@ template imported_class import_class(smart_library && lib, std::size_t size, const std::string & alias_name, Args...args) { lib.add_type_alias(alias_name); - return imported_class::template make(boost::move(lib), size, static_cast(args)...); + return imported_class::template make(std::move(lib), size, static_cast(args)...); } //! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...) @@ -502,7 +503,7 @@ template imported_class import_class(smart_library && lib, const std::string & alias_name, std::size_t size, Args...args) { lib.add_type_alias(alias_name); - return imported_class::template make(boost::move(lib), size, static_cast(args)...); + return imported_class::template make(std::move(lib), size, static_cast(args)...); } diff --git a/include/boost/dll/shared_library.hpp b/include/boost/dll/shared_library.hpp index b1ccfa41..1021e047 100644 --- a/include/boost/dll/shared_library.hpp +++ b/include/boost/dll/shared_library.hpp @@ -26,6 +26,8 @@ # include #endif +#include // std::move + #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif diff --git a/include/boost/dll/smart_library.hpp b/include/boost/dll/smart_library.hpp index 6a8366fa..2be91bff 100644 --- a/include/boost/dll/smart_library.hpp +++ b/include/boost/dll/smart_library.hpp @@ -31,7 +31,7 @@ #include #include - +#include // std::move namespace boost { namespace dll {