// Copyright 2014 Renato Tegon Forti, Antony Polukhin.
-// Copyright 2015-2016 Antony Polukhin.
+// Copyright 2015-2019 Antony Polukhin.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
#ifndef BOOST_DLL_IMPORT_HPP
#define BOOST_DLL_IMPORT_HPP
-#include <boost/config.hpp>
+#include <boost/dll/config.hpp>
#include <boost/core/addressof.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/type_traits/is_object.hpp>
*
* \return callable object if T is a function type, or boost::shared_ptr<T> if T is an object type.
*
-* \throw boost::system::system_error if symbol does not exist or if the DLL/DSO was not loaded.
+* \throw \forcedlinkfs{system_error} if symbol does not exist or if the DLL/DSO was not loaded.
* Overload that accepts path also throws std::bad_alloc in case of insufficient memory.
*/
template <class T>
-BOOST_DLL_IMPORT_RESULT_TYPE import(const boost::filesystem::path& lib, const char* name,
+BOOST_DLL_IMPORT_RESULT_TYPE import(const boost::dll::fs::path& lib, const char* name,
load_mode::type mode = load_mode::default_mode)
{
typedef typename boost::dll::detail::import_type<T>::base_type type;
return type(p, boost::addressof(p->get<T>(name)));
}
-//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+//! \overload boost::dll::import(const boost::dll::fs::path& lib, const char* name, load_mode::type mode)
template <class T>
-BOOST_DLL_IMPORT_RESULT_TYPE import(const boost::filesystem::path& lib, const std::string& name,
+BOOST_DLL_IMPORT_RESULT_TYPE import(const boost::dll::fs::path& lib, const std::string& name,
load_mode::type mode = load_mode::default_mode)
{
return import<T>(lib, name.c_str(), mode);
}
-//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+//! \overload boost::dll::import(const boost::dll::fs::path& lib, const char* name, load_mode::type mode)
template <class T>
BOOST_DLL_IMPORT_RESULT_TYPE import(const shared_library& lib, const char* name) {
typedef typename boost::dll::detail::import_type<T>::base_type type;
return type(p, boost::addressof(p->get<T>(name)));
}
-//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+//! \overload boost::dll::import(const boost::dll::fs::path& lib, const char* name, load_mode::type mode)
template <class T>
BOOST_DLL_IMPORT_RESULT_TYPE import(const shared_library& lib, const std::string& name) {
return import<T>(lib, name.c_str());
}
-//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+//! \overload boost::dll::import(const boost::dll::fs::path& lib, const char* name, load_mode::type mode)
template <class T>
BOOST_DLL_IMPORT_RESULT_TYPE import(BOOST_RV_REF(shared_library) lib, const char* name) {
typedef typename boost::dll::detail::import_type<T>::base_type type;
return type(p, boost::addressof(p->get<T>(name)));
}
-//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+//! \overload boost::dll::import(const boost::dll::fs::path& lib, const char* name, load_mode::type mode)
template <class T>
BOOST_DLL_IMPORT_RESULT_TYPE import(BOOST_RV_REF(shared_library) lib, const std::string& name) {
return import<T>(boost::move(lib), name.c_str());
*
* \return callable object if T is a function type, or boost::shared_ptr<T> if T is an object type.
*
-* \throw boost::system::system_error if symbol does not exist or if the DLL/DSO was not loaded.
+* \throw \forcedlinkfs{system_error} if symbol does not exist or if the DLL/DSO was not loaded.
* Overload that accepts path also throws std::bad_alloc in case of insufficient memory.
*/
template <class T>
-BOOST_DLL_IMPORT_RESULT_TYPE import_alias(const boost::filesystem::path& lib, const char* name,
+BOOST_DLL_IMPORT_RESULT_TYPE import_alias(const boost::dll::fs::path& lib, const char* name,
load_mode::type mode = load_mode::default_mode)
{
typedef typename boost::dll::detail::import_type<T>::base_type type;
return type(p, p->get<T*>(name));
}
-//! \overload boost::dll::import_alias(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+//! \overload boost::dll::import_alias(const boost::dll::fs::path& lib, const char* name, load_mode::type mode)
template <class T>
-BOOST_DLL_IMPORT_RESULT_TYPE import_alias(const boost::filesystem::path& lib, const std::string& name,
+BOOST_DLL_IMPORT_RESULT_TYPE import_alias(const boost::dll::fs::path& lib, const std::string& name,
load_mode::type mode = load_mode::default_mode)
{
return import_alias<T>(lib, name.c_str(), mode);
}
-//! \overload boost::dll::import_alias(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+//! \overload boost::dll::import_alias(const boost::dll::fs::path& lib, const char* name, load_mode::type mode)
template <class T>
BOOST_DLL_IMPORT_RESULT_TYPE import_alias(const shared_library& lib, const char* name) {
typedef typename boost::dll::detail::import_type<T>::base_type type;
return type(p, p->get<T*>(name));
}
-//! \overload boost::dll::import_alias(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+//! \overload boost::dll::import_alias(const boost::dll::fs::path& lib, const char* name, load_mode::type mode)
template <class T>
BOOST_DLL_IMPORT_RESULT_TYPE import_alias(const shared_library& lib, const std::string& name) {
return import_alias<T>(lib, name.c_str());
}
-//! \overload boost::dll::import_alias(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+//! \overload boost::dll::import_alias(const boost::dll::fs::path& lib, const char* name, load_mode::type mode)
template <class T>
BOOST_DLL_IMPORT_RESULT_TYPE import_alias(BOOST_RV_REF(shared_library) lib, const char* name) {
typedef typename boost::dll::detail::import_type<T>::base_type type;
return type(p, p->get<T*>(name));
}
-//! \overload boost::dll::import_alias(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+//! \overload boost::dll::import_alias(const boost::dll::fs::path& lib, const char* name, load_mode::type mode)
template <class T>
BOOST_DLL_IMPORT_RESULT_TYPE import_alias(BOOST_RV_REF(shared_library) lib, const std::string& name) {
return import_alias<T>(boost::move(lib), name.c_str());