X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fboost%2Fboost%2Fasio%2Fdetail%2Fconfig.hpp;h=215c8da6148b95abe944704e3454973212d23ec7;hb=92f5a8d42d07f9929ae4fa7e01342fe8d96808a8;hp=126be7e64fcbc934041195f0c1eeb2be7e50daee;hpb=a0324939f9d0e1905d5df8f57442f09dc70af83d;p=ceph.git diff --git a/ceph/src/boost/boost/asio/detail/config.hpp b/ceph/src/boost/boost/asio/detail/config.hpp index 126be7e64..215c8da61 100644 --- a/ceph/src/boost/boost/asio/detail/config.hpp +++ b/ceph/src/boost/boost/asio/detail/config.hpp @@ -2,7 +2,7 @@ // detail/config.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -70,9 +70,6 @@ # define BOOST_ASIO_MSVC _MSC_VER # endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC) #endif // !defined(BOOST_ASIO_MSVC) -#if defined(BOOST_ASIO_MSVC) -# include // Needed for _HAS_CXX17. -#endif // defined(BOOST_ASIO_MSVC) // Clang / libc++ detection. #if defined(__clang__) @@ -111,15 +108,26 @@ # define BOOST_ASIO_HAS_MOVE 1 # endif // (_MSC_VER >= 1700) # endif // defined(BOOST_ASIO_MSVC) +# if defined(__INTEL_CXX11_MODE__) +# if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) +# define BOOST_ASIO_HAS_MOVE 1 +# endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) +# if defined(__ICL) && (__ICL >= 1500) +# define BOOST_ASIO_HAS_MOVE 1 +# endif // defined(__ICL) && (__ICL >= 1500) +# endif // defined(__INTEL_CXX11_MODE__) # endif // !defined(BOOST_ASIO_DISABLE_MOVE) #endif // !defined(BOOST_ASIO_HAS_MOVE) // If BOOST_ASIO_MOVE_CAST isn't defined, and move support is available, define -// BOOST_ASIO_MOVE_ARG and BOOST_ASIO_MOVE_CAST to take advantage of rvalue -// references and perfect forwarding. +// * BOOST_ASIO_MOVE_ARG, +// * BOOST_ASIO_NONDEDUCED_MOVE_ARG, and +// * BOOST_ASIO_MOVE_CAST +// to take advantage of rvalue references and perfect forwarding. #if defined(BOOST_ASIO_HAS_MOVE) && !defined(BOOST_ASIO_MOVE_CAST) # define BOOST_ASIO_MOVE_ARG(type) type&& # define BOOST_ASIO_MOVE_ARG2(type1, type2) type1, type2&& +# define BOOST_ASIO_NONDEDUCED_MOVE_ARG(type) type& # define BOOST_ASIO_MOVE_CAST(type) static_cast # define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast #endif // defined(BOOST_ASIO_HAS_MOVE) && !defined(BOOST_ASIO_MOVE_CAST) @@ -145,6 +153,7 @@ # else # define BOOST_ASIO_MOVE_ARG(type) type # endif +# define BOOST_ASIO_NONDEDUCED_MOVE_ARG(type) const type& # define BOOST_ASIO_MOVE_CAST(type) static_cast # define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast #endif // !defined(BOOST_ASIO_MOVE_CAST) @@ -229,7 +238,7 @@ // Support noexcept on compilers known to allow it. #if !defined(BOOST_ASIO_NOEXCEPT) # if !defined(BOOST_ASIO_DISABLE_NOEXCEPT) -# if (BOOST_VERSION >= 105300) +# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105300) # define BOOST_ASIO_NOEXCEPT BOOST_NOEXCEPT # define BOOST_ASIO_NOEXCEPT_OR_NOTHROW BOOST_NOEXCEPT_OR_NOTHROW # elif defined(__clang__) @@ -275,9 +284,9 @@ # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(BOOST_ASIO_MSVC) -# if (_MSC_VER >= 1700) +# if (_MSC_VER >= 1800) # define BOOST_ASIO_HAS_DECLTYPE 1 -# endif // (_MSC_VER >= 1700) +# endif // (_MSC_VER >= 1800) # endif // defined(BOOST_ASIO_MSVC) # endif // !defined(BOOST_ASIO_DISABLE_DECLTYPE) #endif // !defined(BOOST_ASIO_HAS_DECLTYPE) @@ -305,6 +314,42 @@ # endif // !defined(BOOST_ASIO_DISABLE_ALIAS_TEMPLATES) #endif // !defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) +// Support return type deduction on compilers known to allow it. +#if !defined(BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION) +# if !defined(BOOST_ASIO_DISABLE_RETURN_TYPE_DEDUCTION) +# if defined(__clang__) +# if __has_feature(__cxx_return_type_deduction__) +# define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1 +# endif // __has_feature(__cxx_alias_templates__) +# elif (__cplusplus >= 201402) +# define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1 +# elif defined(__cpp_return_type_deduction) +# if (__cpp_return_type_deduction >= 201304) +# define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1 +# endif // (__cpp_return_type_deduction >= 201304) +# endif // defined(__cpp_return_type_deduction) +# endif // !defined(BOOST_ASIO_DISABLE_RETURN_TYPE_DEDUCTION) +#endif // !defined(BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION) + +// Support default function template arguments on compilers known to allow it. +#if !defined(BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) +# if !defined(BOOST_ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) +# if (__cplusplus >= 201103) +# define BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS 1 +# endif // (__cplusplus >= 201103) +# endif // !defined(BOOST_ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) +#endif // !defined(BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) + +// Support concepts on compilers known to allow them. +#if !defined(BOOST_ASIO_HAS_CONCEPTS) +# if !defined(BOOST_ASIO_DISABLE_CONCEPTS) +# if __cpp_concepts +# define BOOST_ASIO_HAS_CONCEPTS 1 +# define BOOST_ASIO_CONCEPT concept bool +# endif // __cpp_concepts +# endif // !defined(BOOST_ASIO_DISABLE_CONCEPTS) +#endif // !defined(BOOST_ASIO_HAS_CONCEPTS) + // Standard library support for system errors. # if !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR) # if defined(__clang__) @@ -332,7 +377,7 @@ // Compliant C++11 compilers put noexcept specifiers on error_category members. #if !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) -# if (BOOST_VERSION >= 105300) +# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105300) # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT BOOST_NOEXCEPT # elif defined(__clang__) # if __has_feature(__cxx_noexcept__) @@ -441,7 +486,13 @@ # if __has_include() # define BOOST_ASIO_HAS_STD_ATOMIC 1 # endif // __has_include() -# endif // (__cplusplus >= 201103) +# elif defined(__apple_build_version__) && defined(_LIBCPP_VERSION) +# if (__clang_major__ >= 10) +# if __has_include() +# define BOOST_ASIO_HAS_STD_ATOMIC 1 +# endif // __has_include() +# endif // (__clang_major__ >= 10) +# endif /// defined(__apple_build_version__) && defined(_LIBCPP_VERSION) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) @@ -493,9 +544,9 @@ // Boost support for chrono. #if !defined(BOOST_ASIO_HAS_BOOST_CHRONO) # if !defined(BOOST_ASIO_DISABLE_BOOST_CHRONO) -# if (BOOST_VERSION >= 104700) +# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 104700) # define BOOST_ASIO_HAS_BOOST_CHRONO 1 -# endif // (BOOST_VERSION >= 104700) +# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 104700) # endif // !defined(BOOST_ASIO_DISABLE_BOOST_CHRONO) #endif // !defined(BOOST_ASIO_HAS_BOOST_CHRONO) @@ -759,9 +810,7 @@ # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) -# if defined(_GLIBCXX_HAS_GTHREADS) -# define BOOST_ASIO_HAS_STD_FUTURE 1 -# endif // defined(_GLIBCXX_HAS_GTHREADS) +# define BOOST_ASIO_HAS_STD_FUTURE 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # endif // defined(__GNUC__) @@ -777,23 +826,29 @@ #if !defined(BOOST_ASIO_HAS_STD_STRING_VIEW) # if !defined(BOOST_ASIO_DISABLE_STD_STRING_VIEW) # if defined(__clang__) -# if (__cplusplus >= 201703) -# if __has_include() -# define BOOST_ASIO_HAS_STD_STRING_VIEW 1 -# endif // __has_include() -# endif // (__cplusplus >= 201703) -# endif // defined(__clang__) -# if defined(__GNUC__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if (__cplusplus >= 201402) +# if __has_include() +# define BOOST_ASIO_HAS_STD_STRING_VIEW 1 +# endif // __has_include() +# endif // (__cplusplus >= 201402) +# else // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if (__cplusplus >= 201703) +# if __has_include() +# define BOOST_ASIO_HAS_STD_STRING_VIEW 1 +# endif // __has_include() +# endif // (__cplusplus >= 201703) +# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# elif defined(__GNUC__) # if (__GNUC__ >= 7) # if (__cplusplus >= 201703) # define BOOST_ASIO_HAS_STD_STRING_VIEW 1 # endif // (__cplusplus >= 201703) # endif // (__GNUC__ >= 7) -# endif // defined(__GNUC__) -# if defined(BOOST_ASIO_MSVC) -# if (_MSC_VER >= 1910 && _HAS_CXX17) -# define BOOST_ASIO_HAS_STD_STRING_VIEW -# endif // (_MSC_VER >= 1910 && _HAS_CXX17) +# elif defined(BOOST_ASIO_MSVC) +# if (_MSC_VER >= 1910 && _MSVC_LANG >= 201703) +# define BOOST_ASIO_HAS_STD_STRING_VIEW 1 +# endif // (_MSC_VER >= 1910 && _MSVC_LANG >= 201703) # endif // defined(BOOST_ASIO_MSVC) # endif // !defined(BOOST_ASIO_DISABLE_STD_STRING_VIEW) #endif // !defined(BOOST_ASIO_HAS_STD_STRING_VIEW) @@ -802,11 +857,21 @@ #if !defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) # if !defined(BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW) # if defined(__clang__) -# if (__cplusplus >= 201402) -# if __has_include() -# define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1 -# endif // __has_include() -# endif // (__cplusplus >= 201402) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if (_LIBCPP_VERSION < 7000) +# if (__cplusplus >= 201402) +# if __has_include() +# define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1 +# endif // __has_include() +# endif // (__cplusplus >= 201402) +# endif // (_LIBCPP_VERSION < 7000) +# else // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if (__cplusplus >= 201402) +# if __has_include() +# define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1 +# endif // __has_include() +# endif // (__cplusplus >= 201402) +# endif // // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4) @@ -851,9 +916,9 @@ #if !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT) # if !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT) # if defined(BOOST_ASIO_MSVC) -# if (_MSC_VER >= 1910 && _HAS_CXX17) +# if (_MSC_VER >= 1911 && _MSVC_LANG >= 201703) # define BOOST_ASIO_HAS_STD_INVOKE_RESULT 1 -# endif // (_MSC_VER >= 1910 && _HAS_CXX17) +# endif // (_MSC_VER >= 1911 && _MSVC_LANG >= 201703) # endif // defined(BOOST_ASIO_MSVC) # endif // !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT) #endif // !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT) @@ -903,15 +968,15 @@ # if defined(_MSC_VER) || defined(__BORLANDC__) # pragma message( \ "Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:\n"\ - "- add -D_WIN32_WINNT=0x0501 to the compiler command line; or\n"\ - "- add _WIN32_WINNT=0x0501 to your project's Preprocessor Definitions.\n"\ - "Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).") + "- add -D_WIN32_WINNT=0x0601 to the compiler command line; or\n"\ + "- add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.\n"\ + "Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).") # else // defined(_MSC_VER) || defined(__BORLANDC__) # warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. -# warning For example, add -D_WIN32_WINNT=0x0501 to the compiler command line. -# warning Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target). +# warning For example, add -D_WIN32_WINNT=0x0601 to the compiler command line. +# warning Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target). # endif // defined(_MSC_VER) || defined(__BORLANDC__) -# define _WIN32_WINNT 0x0501 +# define _WIN32_WINNT 0x0601 # endif // !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS) # if defined(_MSC_VER) # if defined(_WIN32) && !defined(WIN32) @@ -982,7 +1047,8 @@ || defined(__FreeBSD__) \ || defined(__NetBSD__) \ || defined(__OpenBSD__) \ - || defined(__linux__) + || defined(__linux__) \ + || defined(__HAIKU__) # define BOOST_ASIO_HAS_UNISTD_H 1 # endif # endif // !defined(BOOST_ASIO_HAS_BOOST_CONFIG) @@ -1202,6 +1268,8 @@ # define BOOST_ASIO_HAS_THREADS 1 # elif defined(__APPLE__) # define BOOST_ASIO_HAS_THREADS 1 +# elif defined(__HAIKU__) +# define BOOST_ASIO_HAS_THREADS 1 # elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0) # define BOOST_ASIO_HAS_THREADS 1 # elif defined(_PTHREADS) @@ -1217,6 +1285,8 @@ # define BOOST_ASIO_HAS_PTHREADS 1 # elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0) # define BOOST_ASIO_HAS_PTHREADS 1 +# elif defined(__HAIKU__) +# define BOOST_ASIO_HAS_PTHREADS 1 # endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS) # endif // defined(BOOST_ASIO_HAS_THREADS) #endif // !defined(BOOST_ASIO_HAS_PTHREADS) @@ -1346,33 +1416,6 @@ // || (defined(__MACH__) && defined(__APPLE__)) #endif // !defined(BOOST_ASIO_DISABLE_SSIZE_T) -// Helper macros to manage the transition away from the old services-based API. -#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES) -# define BOOST_ASIO_SVC_TPARAM , typename Service -# define BOOST_ASIO_SVC_TPARAM_DEF1(d1) , typename Service d1 -# define BOOST_ASIO_SVC_TPARAM_DEF2(d1, d2) , typename Service d1, d2 -# define BOOST_ASIO_SVC_TARG , Service -# define BOOST_ASIO_SVC_T Service -# define BOOST_ASIO_SVC_TPARAM1 , typename Service1 -# define BOOST_ASIO_SVC_TPARAM1_DEF1(d1) , typename Service1 d1 -# define BOOST_ASIO_SVC_TPARAM1_DEF2(d1, d2) , typename Service1 d1, d2 -# define BOOST_ASIO_SVC_TARG1 , Service1 -# define BOOST_ASIO_SVC_T1 Service1 -# define BOOST_ASIO_SVC_ACCESS public -#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) -# define BOOST_ASIO_SVC_TPARAM -# define BOOST_ASIO_SVC_TPARAM_DEF1(d1) -# define BOOST_ASIO_SVC_TPARAM_DEF2(d1, d2) -# define BOOST_ASIO_SVC_TARG -// BOOST_ASIO_SVC_T is defined at each point of use. -# define BOOST_ASIO_SVC_TPARAM1 -# define BOOST_ASIO_SVC_TPARAM1_DEF1(d1) -# define BOOST_ASIO_SVC_TPARAM1_DEF2(d1, d2) -# define BOOST_ASIO_SVC_TARG1 -// BOOST_ASIO_SVC_T1 is defined at each point of use. -# define BOOST_ASIO_SVC_ACCESS protected -#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES) - // Helper macros to manage transition away from error_code return values. #if defined(BOOST_ASIO_NO_DEPRECATED) # define BOOST_ASIO_SYNC_OP_VOID void @@ -1424,11 +1467,11 @@ # endif // defined(BOOST_ASIO_MSVC) # endif // !defined(BOOST_ASIO_DISABLE_CO_AWAIT) # if defined(__clang__) -# if (__cpp_coroutines >= 201703) +# if (__cplusplus >= 201703) && (__cpp_coroutines >= 201703) # if __has_include() # define BOOST_ASIO_HAS_CO_AWAIT 1 # endif // __has_include() -# endif // (__cpp_coroutines >= 201703) +# endif // (__cplusplus >= 201703) && (__cpp_coroutines >= 201703) # endif // defined(__clang__) #endif // !defined(BOOST_ASIO_HAS_CO_AWAIT)