Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:44

0001 // Copyright Antony Polukhin, 2018-2023.
0002 //
0003 // Distributed under the Boost Software License, Version 1.0.
0004 // (See accompanying file LICENSE_1_0.txt
0005 // or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 
0007 /// \file boost/dll/config.hpp
0008 /// \brief Imports filesystem, error_code, errc, system_error, make_error_code from Boost or C++17 into `boost::dll::fs` namespace.
0009 
0010 #ifndef BOOST_DLL_DETAIL_CONFIG_HPP
0011 #define BOOST_DLL_DETAIL_CONFIG_HPP
0012 
0013 #include <boost/config.hpp>
0014 #ifdef BOOST_HAS_PRAGMA_ONCE
0015 #   pragma once
0016 #endif
0017 
0018 #ifdef BOOST_DLL_DOXYGEN
0019 /// Define this macro to make Boost.DLL use C++17's std::filesystem::path, std::system_error and std::error_code.
0020 #define BOOST_DLL_USE_STD_FS BOOST_DLL_USE_STD_FS
0021 
0022 /// This namespace contains aliases to the Boost or C++17 classes. Aliases are configured using BOOST_DLL_USE_STD_FS macro.
0023 namespace boost { namespace dll { namespace fs {
0024 
0025 /// Alias to `std::filesystem::path` if \forcedmacrolink{BOOST_DLL_USE_STD_FS} is defined by user.
0026 /// Alias to `boost::filesystem::path` otherwise.
0027 using path = std::conditional_t<BOOST_DLL_USE_STD_FS, std::filesystem::path, boost::filesystem::path>;
0028 
0029 /// Alias to `std::error_code` if \forcedmacrolink{BOOST_DLL_USE_STD_FS} is defined by user.
0030 /// boost::system::error_code otherwise.
0031 using error_code = std::conditional_t<BOOST_DLL_USE_STD_FS, std::error_code, boost::system::error_code>;
0032 
0033 /// Alias to `std::system_error` if \forcedmacrolink{BOOST_DLL_USE_STD_FS} is defined by user.
0034 /// Alias to `boost::system::system_error` otherwise.
0035 using system_error = std::conditional_t<BOOST_DLL_USE_STD_FS, std::system_error, boost::system::system_error>;
0036 
0037 }}}
0038 
0039 #endif
0040 
0041 #ifdef BOOST_DLL_USE_STD_FS
0042 #include <filesystem>
0043 #include <system_error>
0044 
0045 namespace boost { namespace dll { namespace fs {
0046 
0047 using namespace std::filesystem;
0048 
0049 using std::error_code;
0050 using std::system_error;
0051 using std::make_error_code;
0052 using std::errc;
0053 using std::system_category;
0054 
0055 }}}
0056 
0057 #else // BOOST_DLL_USE_STD_FS
0058 
0059 #include <boost/filesystem/path.hpp>
0060 #include <boost/filesystem/operations.hpp>
0061 #include <boost/system/error_code.hpp>
0062 #include <boost/system/system_error.hpp>
0063 
0064 namespace boost { namespace dll { namespace fs {
0065 
0066 using namespace boost::filesystem;
0067 
0068 using boost::system::error_code;
0069 using boost::system::system_error;
0070 using boost::system::errc::make_error_code;
0071 namespace errc = boost::system::errc;
0072 using boost::system::system_category;
0073 
0074 }}}
0075 
0076 #endif // BOOST_DLL_USE_STD_FS
0077 
0078 #endif // BOOST_DLL_DETAIL_PUSH_OPTIONS_HPP
0079