diff options
author | thegeorg <thegeorg@yandex-team.com> | 2024-09-17 12:21:09 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.com> | 2024-09-17 12:33:46 +0300 |
commit | 528fd2157137daeb3d185045cc021e92287c1866 (patch) | |
tree | b1f151f08b2626ef1b704c26ba00f1c7758a00a6 | |
parent | e21cdb7047c5fc686d211be13f6466d6d0c5a9cf (diff) | |
download | ydb-528fd2157137daeb3d185045cc021e92287c1866.tar.gz |
Update contrib/restricted/boost/asio to 1.77.0
commit_hash:83322fdc7824732bf3faef0b81caae9efef2da11
6 files changed, 275 insertions, 73 deletions
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp index 6e1d19d34a..3e810c89f7 100644 --- a/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp +++ b/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp @@ -12,6 +12,7 @@ #define BOOST_ASIO_DETAIL_CONFIG_HPP #if defined(BOOST_ASIO_STANDALONE) +# define BOOST_ASIO_DISABLE_BOOST_ALIGN 1 # define BOOST_ASIO_DISABLE_BOOST_ARRAY 1 # define BOOST_ASIO_DISABLE_BOOST_ASSERT 1 # define BOOST_ASIO_DISABLE_BOOST_BIND 1 @@ -98,8 +99,7 @@ # if __has_feature(__cxx_rvalue_references__) # define BOOST_ASIO_HAS_MOVE 1 # endif // __has_feature(__cxx_rvalue_references__) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_MOVE 1 @@ -172,8 +172,7 @@ # if __has_feature(__cxx_variadic_templates__) # define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1 # endif // __has_feature(__cxx_variadic_templates__) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1 @@ -197,18 +196,17 @@ // Support deleted functions on compilers known to allow it. #if !defined(BOOST_ASIO_DELETED) -# if defined(__GNUC__) +# if defined(__clang__) +# if __has_feature(__cxx_deleted_functions__) +# define BOOST_ASIO_DELETED = delete +# endif // __has_feature(__cxx_deleted_functions__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_DELETED = delete # endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # endif // defined(__GNUC__) -# if defined(__clang__) -# if __has_feature(__cxx_deleted_functions__) -# define BOOST_ASIO_DELETED = delete -# endif // __has_feature(__cxx_deleted_functions__) -# endif // defined(__clang__) # if defined(BOOST_ASIO_MSVC) # if (_MSC_VER >= 1900) # define BOOST_ASIO_DELETED = delete @@ -226,8 +224,7 @@ # if __has_feature(__cxx_constexpr__) # define BOOST_ASIO_HAS_CONSTEXPR 1 # endif // __has_feature(__cxx_constexpr__) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_CONSTEXPR 1 @@ -333,6 +330,25 @@ # endif // defined(BOOST_ASIO_HAS_NOEXCEPT) #endif // !defined(BOOST_ASIO_NOEXCEPT_IF) +// Support noexcept on function types on compilers known to allow it. +#if !defined(BOOST_ASIO_HAS_NOEXCEPT_FUNCTION_TYPE) +# if !defined(BOOST_ASIO_DISABLE_NOEXCEPT_FUNCTION_TYPE) +# if defined(__clang__) +# if (__cplusplus >= 202002) +# define BOOST_ASIO_HAS_NOEXCEPT_FUNCTION_TYPE 1 +# endif // (__cplusplus >= 202002) +# elif defined(__GNUC__) +# if (__cplusplus >= 202002) +# define BOOST_ASIO_HAS_NOEXCEPT_FUNCTION_TYPE 1 +# endif // (__cplusplus >= 202002) +# elif defined(BOOST_ASIO_MSVC) +# if (_MSC_VER >= 1900 && _MSVC_LANG >= 202002) +# define BOOST_ASIO_HAS_NOEXCEPT_FUNCTION_TYPE 1 +# endif // (_MSC_VER >= 1900 && _MSVC_LANG >= 202002) +# endif // defined(BOOST_ASIO_MSVC) +# endif // !defined(BOOST_ASIO_DISABLE_NOEXCEPT_FUNCTION_TYPE) +#endif // !defined(BOOST_ASIO_HAS_NOEXCEPT_FUNCTION_TYPE) + // Support automatic type deduction on compilers known to support it. #if !defined(BOOST_ASIO_HAS_DECLTYPE) # if !defined(BOOST_ASIO_DISABLE_DECLTYPE) @@ -340,8 +356,7 @@ # if __has_feature(__cxx_decltype__) # define BOOST_ASIO_HAS_DECLTYPE 1 # endif // __has_feature(__cxx_decltype__) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_DECLTYPE 1 @@ -363,8 +378,7 @@ # if __has_feature(__cxx_alias_templates__) # define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1 # endif // __has_feature(__cxx_alias_templates__) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1 @@ -409,6 +423,19 @@ # endif // !defined(BOOST_ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) #endif // !defined(BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) +// Support enum classes on compilers known to allow them. +#if !defined(BOOST_ASIO_HAS_ENUM_CLASS) +# if !defined(BOOST_ASIO_DISABLE_ENUM_CLASS) +# if (__cplusplus >= 201103) +# define BOOST_ASIO_HAS_ENUM_CLASS 1 +# elif defined(BOOST_ASIO_MSVC) +# if (_MSC_VER >= 1900 && _MSVC_LANG >= 201103) +# define BOOST_ASIO_HAS_ENUM_CLASS 1 +# endif // (_MSC_VER >= 1900 && _MSVC_LANG >= 201103) +# endif // defined(BOOST_ASIO_MSVC) +# endif // !defined(BOOST_ASIO_DISABLE_ENUM_CLASS) +#endif // !defined(BOOST_ASIO_HAS_ENUM_CLASS) + // Support concepts on compilers known to allow them. #if !defined(BOOST_ASIO_HAS_CONCEPTS) # if !defined(BOOST_ASIO_DISABLE_CONCEPTS) @@ -432,8 +459,7 @@ # define BOOST_ASIO_HAS_VARIABLE_TEMPLATES 1 # endif // __has_feature(__cxx_variable_templates__) # endif // (__cplusplus >= 201402) -# endif // defined(__clang__) -# if defined(__GNUC__) && !defined(__INTEL_COMPILER) +# elif defined(__GNUC__) && !defined(__INTEL_COMPILER) # if (__GNUC__ >= 6) # if (__cplusplus >= 201402) # define BOOST_ASIO_HAS_VARIABLE_TEMPLATES 1 @@ -457,8 +483,7 @@ # define BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES 1 # endif // __has_feature(__cxx_variable_templates__) # endif // (__cplusplus >= 201703) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 8) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 8) # if (__cplusplus >= 201402) # define BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES 1 @@ -480,8 +505,7 @@ # if (__cplusplus >= 201402) # define BOOST_ASIO_HAS_CONSTANT_EXPRESSION_SFINAE 1 # endif // (__cplusplus >= 201402) -# endif // defined(__clang__) -# if defined(__GNUC__) && !defined(__INTEL_COMPILER) +# elif defined(__GNUC__) && !defined(__INTEL_COMPILER) # if (__GNUC__ >= 7) # if (__cplusplus >= 201402) # define BOOST_ASIO_HAS_CONSTANT_EXPRESSION_SFINAE 1 @@ -503,7 +527,11 @@ # if (__cplusplus >= 201103) # define BOOST_ASIO_HAS_WORKING_EXPRESSION_SFINAE 1 # endif // (__cplusplus >= 201103) -# endif // !defined(BOOST_ASIO_MSVC) && !defined(__INTEL_COMPILER) +# elif defined(BOOST_ASIO_MSVC) && (_MSC_VER >= 1929) +# if (_MSVC_LANG >= 202000) +# define BOOST_ASIO_HAS_WORKING_EXPRESSION_SFINAE 1 +# endif // (_MSVC_LANG >= 202000) +# endif // defined(BOOST_ASIO_MSVC) && (_MSC_VER >= 1929) # endif // !defined(BOOST_ASIO_DISABLE_WORKING_EXPRESSION_SFINAE) #endif // !defined(BOOST_ASIO_HAS_WORKING_EXPRESSION_SFINAE) @@ -514,8 +542,7 @@ # if __has_feature(__cxx_reference_qualified_functions__) # define BOOST_ASIO_HAS_REF_QUALIFIED_FUNCTIONS 1 # endif // __has_feature(__cxx_reference_qualified_functions__) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_REF_QUALIFIED_FUNCTIONS 1 @@ -545,6 +572,52 @@ # endif // !defined(BOOST_ASIO_RVALUE_REF_QUAL) #endif // defined(BOOST_ASIO_HAS_REF_QUALIFIED_FUNCTIONS) +// Support for the alignof operator. +#if !defined(BOOST_ASIO_HAS_ALIGNOF) +# if !defined(BOOST_ASIO_DISABLE_ALIGNOF) +# if (__cplusplus >= 201103) +# define BOOST_ASIO_HAS_ALIGNOF 1 +# endif // (__cplusplus >= 201103) +# endif // !defined(BOOST_ASIO_DISABLE_ALIGNOF) +#endif // !defined(BOOST_ASIO_HAS_ALIGNOF) + +#if defined(BOOST_ASIO_HAS_ALIGNOF) +# define BOOST_ASIO_ALIGNOF(T) alignof(T) +# if defined(__GNUC__) +# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4) +# define BOOST_ASIO_DEFAULT_ALIGN alignof(std::max_align_t) +# else // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4) +# define BOOST_ASIO_DEFAULT_ALIGN alignof(max_align_t) +# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4) +# else // defined(__GNUC__) +# define BOOST_ASIO_DEFAULT_ALIGN alignof(std::max_align_t) +# endif // defined(__GNUC__) +#else // defined(BOOST_ASIO_HAS_ALIGNOF) +# define BOOST_ASIO_ALIGNOF(T) 1 +# define BOOST_ASIO_DEFAULT_ALIGN 1 +#endif // defined(BOOST_ASIO_HAS_ALIGNOF) + +// Standard library support for aligned allocation. +#if !defined(BOOST_ASIO_HAS_STD_ALIGNED_ALLOC) +# if !defined(BOOST_ASIO_DISABLE_STD_ALIGNED_ALLOC) +# if (__cplusplus >= 201703) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if (_LIBCPP_STD_VER > 14) && defined(_LIBCPP_HAS_ALIGNED_ALLOC) +# define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1 +# endif // (_LIBCPP_STD_VER > 14) && defined(_LIBCPP_HAS_ALIGNED_ALLOC) +# elif defined(_GLIBCXX_HAVE_ALIGNED_ALLOC) +# define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1 +# endif // defined(_GLIBCXX_HAVE_ALIGNED_ALLOC) +# elif defined(__GNUC__) +# if defined(_GLIBCXX_HAVE_ALIGNED_ALLOC) +# define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1 +# endif // defined(_GLIBCXX_HAVE_ALIGNED_ALLOC) +# endif // defined(__GNUC__) +# endif // (__cplusplus >= 201703) +# endif // !defined(BOOST_ASIO_DISABLE_STD_ALIGNED_ALLOC) +#endif // !defined(BOOST_ASIO_HAS_STD_ALIGNED_ALLOC) + // Standard library support for system errors. # if !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR) # if defined(__clang__) @@ -555,8 +628,7 @@ # define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 # endif // __has_include(<system_error>) # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 @@ -605,8 +677,7 @@ # define BOOST_ASIO_HAS_STD_ARRAY 1 # endif // __has_include(<array>) # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_ARRAY 1 @@ -630,8 +701,7 @@ # elif (__cplusplus >= 201103) # define BOOST_ASIO_HAS_STD_SHARED_PTR 1 # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_SHARED_PTR 1 @@ -655,8 +725,7 @@ # elif (__cplusplus >= 201103) # define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1 # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1 @@ -688,8 +757,7 @@ # endif // __has_include(<atomic>) # endif // (__clang_major__ >= 10) # endif // defined(__apple_build_version__) && defined(_LIBCPP_VERSION) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_ATOMIC 1 @@ -717,8 +785,7 @@ # define BOOST_ASIO_HAS_STD_CHRONO 1 # endif // __has_include(<chrono>) # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_CHRONO 1 @@ -770,8 +837,7 @@ # elif (__cplusplus >= 201103) # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 @@ -795,8 +861,7 @@ # elif (__cplusplus >= 201103) # define BOOST_ASIO_HAS_STD_FUNCTION 1 # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_FUNCTION 1 @@ -811,6 +876,30 @@ # endif // !defined(BOOST_ASIO_DISABLE_STD_FUNCTION) #endif // !defined(BOOST_ASIO_HAS_STD_FUNCTION) +// Standard library support for the reference_wrapper class. +#if !defined(BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER) +# if !defined(BOOST_ASIO_DISABLE_STD_REFERENCE_WRAPPER) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER 1 +# elif (__cplusplus >= 201103) +# define BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER 1 +# endif // (__cplusplus >= 201103) +# elif defined(__GNUC__) +# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) +# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER 1 +# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) +# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) +# endif // defined(__GNUC__) +# if defined(BOOST_ASIO_MSVC) +# if (_MSC_VER >= 1700) +# define BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER 1 +# endif // (_MSC_VER >= 1700) +# endif // defined(BOOST_ASIO_MSVC) +# endif // !defined(BOOST_ASIO_DISABLE_STD_REFERENCE_WRAPPER) +#endif // !defined(BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER) + // Standard library support for type traits. #if !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) # if !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS) @@ -822,8 +911,7 @@ # define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 # endif // __has_include(<type_traits>) # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 @@ -893,8 +981,7 @@ # elif (__cplusplus >= 201103) # define BOOST_ASIO_HAS_CSTDINT 1 # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_CSTDINT 1 @@ -920,8 +1007,7 @@ # define BOOST_ASIO_HAS_STD_THREAD 1 # endif // __has_include(<thread>) # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_THREAD 1 @@ -947,8 +1033,7 @@ # define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 # endif // __has_include(<mutex>) # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 @@ -974,8 +1059,7 @@ # define BOOST_ASIO_HAS_STD_CALL_ONCE 1 # endif // __has_include(<mutex>) # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_CALL_ONCE 1 @@ -1001,8 +1085,7 @@ # define BOOST_ASIO_HAS_STD_FUTURE 1 # endif // __has_include(<future>) # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_FUTURE 1 @@ -1067,8 +1150,7 @@ # endif // __has_include(<experimental/string_view>) # endif // (__cplusplus >= 201402) # endif // // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4) # if (__cplusplus >= 201402) # define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1 @@ -1607,6 +1689,15 @@ # endif // !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT) #endif // !defined(BOOST_ASIO_STATIC_CONSTANT) +// Boost align library. +#if !defined(BOOST_ASIO_HAS_BOOST_ALIGN) +# if !defined(BOOST_ASIO_DISABLE_BOOST_ALIGN) +# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105600) +# define BOOST_ASIO_HAS_BOOST_ALIGN 1 +# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105600) +# endif // !defined(BOOST_ASIO_DISABLE_BOOST_ALIGN) +#endif // !defined(BOOST_ASIO_HAS_BOOST_ALIGN) + // Boost array library. #if !defined(BOOST_ASIO_HAS_BOOST_ARRAY) # if !defined(BOOST_ASIO_DISABLE_BOOST_ARRAY) @@ -1761,24 +1852,27 @@ #if !defined(BOOST_ASIO_HAS_CO_AWAIT) # if !defined(BOOST_ASIO_DISABLE_CO_AWAIT) # if defined(BOOST_ASIO_MSVC) -# if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) +# if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) && !defined(__clang__) # define BOOST_ASIO_HAS_CO_AWAIT 1 # elif (_MSC_FULL_VER >= 190023506) # if defined(_RESUMABLE_FUNCTIONS_SUPPORTED) # define BOOST_ASIO_HAS_CO_AWAIT 1 # endif // defined(_RESUMABLE_FUNCTIONS_SUPPORTED) # endif // (_MSC_FULL_VER >= 190023506) -# endif // defined(BOOST_ASIO_MSVC) -# if defined(__clang__) -# if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902) -# if __has_include(<coroutine>) -# define BOOST_ASIO_HAS_CO_AWAIT 1 -# endif // __has_include(<coroutine>) -# elif (__cplusplus >= 201703) && (__cpp_coroutines >= 201703) -# if __has_include(<experimental/coroutine>) -# define BOOST_ASIO_HAS_CO_AWAIT 1 -# endif // __has_include(<experimental/coroutine>) -# endif // (__cplusplus >= 201703) && (__cpp_coroutines >= 201703) +# elif defined(__clang__) +# if (__clang_major__ >= 14) +# if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902) +# if __has_include(<coroutine>) +# define BOOST_ASIO_HAS_CO_AWAIT 1 +# endif // __has_include(<coroutine>) +# endif // (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902) +# else // (__clang_major__ >= 14) +# if (__cplusplus >= 201703) && (__cpp_coroutines >= 201703) +# if __has_include(<experimental/coroutine>) +# define BOOST_ASIO_HAS_CO_AWAIT 1 +# endif // __has_include(<experimental/coroutine>) +# endif // (__cplusplus >= 201703) && (__cpp_coroutines >= 201703) +# endif // (__clang_major__ >= 14) # elif defined(__GNUC__) # if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902) # if __has_include(<coroutine>) @@ -1796,8 +1890,15 @@ # if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) # define BOOST_ASIO_HAS_STD_COROUTINE 1 # endif // (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) -# endif // defined(BOOST_ASIO_MSVC) -# if defined(__GNUC__) +# elif defined(__clang__) +# if (__clang_major__ >= 14) +# if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902) +# if __has_include(<coroutine>) +# define BOOST_ASIO_HAS_STD_COROUTINE 1 +# endif // __has_include(<coroutine>) +# endif // (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902) +# endif // (__clang_major__ >= 14) +# elif defined(__GNUC__) # if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902) # if __has_include(<coroutine>) # define BOOST_ASIO_HAS_STD_COROUTINE 1 @@ -1841,8 +1942,7 @@ # elif (__cplusplus >= 201103) # define BOOST_ASIO_HAS_STD_HASH 1 # endif // (__cplusplus >= 201103) -# endif // defined(__clang__) -# if defined(__GNUC__) +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_HASH 1 diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/functional.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/functional.hpp index e2996f7211..02611a02bb 100644 --- a/contrib/restricted/boost/asio/include/boost/asio/detail/functional.hpp +++ b/contrib/restricted/boost/asio/include/boost/asio/detail/functional.hpp @@ -34,6 +34,12 @@ using boost::function; #endif // defined(BOOST_ASIO_HAS_STD_FUNCTION) } // namespace detail + +#if defined(BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER) +using std::ref; +using std::reference_wrapper; +#endif // defined(BOOST_ASIO_HAS_STD_REFERENCE_WRAPPER) + } // namespace asio } // namespace boost diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/memory.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/memory.hpp index 2d2e3a6f8d..98fc850e5b 100644 --- a/contrib/restricted/boost/asio/include/boost/asio/detail/memory.hpp +++ b/contrib/restricted/boost/asio/include/boost/asio/detail/memory.hpp @@ -16,7 +16,11 @@ #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include <boost/asio/detail/config.hpp> +#include <cstddef> +#include <cstdlib> #include <memory> +#include <new> +#include <boost/asio/detail/throw_exception.hpp> #if !defined(BOOST_ASIO_HAS_STD_SHARED_PTR) # include <boost/make_shared.hpp> @@ -28,6 +32,14 @@ # include <boost/utility/addressof.hpp> #endif // !defined(BOOST_ASIO_HAS_STD_ADDRESSOF) +#if !defined(BOOST_ASIO_HAS_STD_ALIGNED_ALLOC) \ + && defined(BOOST_ASIO_HAS_BOOST_ALIGN) \ + && defined(BOOST_ASIO_HAS_ALIGNOF) +# include <boost/align/aligned_alloc.hpp> +#endif // !defined(BOOST_ASIO_HAS_STD_ALIGNED_ALLOC) + // && defined(BOOST_ASIO_HAS_BOOST_ALIGN) + // && defined(BOOST_ASIO_HAS_ALIGNOF) + namespace boost { namespace asio { namespace detail { @@ -69,6 +81,54 @@ struct allocator_arg_t {}; /**/ #endif // defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS) +inline void* aligned_new(std::size_t align, std::size_t size) +{ +#if defined(BOOST_ASIO_HAS_STD_ALIGNED_ALLOC) && defined(BOOST_ASIO_HAS_ALIGNOF) + size = (size % align == 0) ? size : size + (align - size % align); + void* ptr = std::aligned_alloc(align, size); + if (!ptr) + { + std::bad_alloc ex; + boost::asio::detail::throw_exception(ex); + } + return ptr; +#elif defined(BOOST_ASIO_HAS_BOOST_ALIGN) && defined(BOOST_ASIO_HAS_ALIGNOF) + size = (size % align == 0) ? size : size + (align - size % align); + void* ptr = boost::alignment::aligned_alloc(align, size); + if (!ptr) + { + std::bad_alloc ex; + boost::asio::detail::throw_exception(ex); + } + return ptr; +#elif defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_HAS_ALIGNOF) + size = (size % align == 0) ? size : size + (align - size % align); + void* ptr = _aligned_malloc(size, align); + if (!ptr) + { + std::bad_alloc ex; + boost::asio::detail::throw_exception(ex); + } + return ptr; +#else // defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_HAS_ALIGNOF) + (void)align; + return ::operator new(size); +#endif // defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_HAS_ALIGNOF) +} + +inline void aligned_delete(void* ptr) +{ +#if defined(BOOST_ASIO_HAS_STD_ALIGNED_ALLOC) && defined(BOOST_ASIO_HAS_ALIGNOF) + std::free(ptr); +#elif defined(BOOST_ASIO_HAS_BOOST_ALIGN) && defined(BOOST_ASIO_HAS_ALIGNOF) + boost::alignment::aligned_free(ptr); +#elif defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_HAS_ALIGNOF) + _aligned_free(ptr); +#else // defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_HAS_ALIGNOF) + ::operator delete(ptr); +#endif // defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_HAS_ALIGNOF) +} + } // namespace asio } // namespace boost diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/pop_options.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/pop_options.hpp index 5192967b76..c34eb983b4 100644 --- a/contrib/restricted/boost/asio/include/boost/asio/detail/pop_options.hpp +++ b/contrib/restricted/boost/asio/include/boost/asio/detail/pop_options.hpp @@ -51,6 +51,10 @@ # pragma GCC diagnostic pop +# pragma pop_macro ("emit") +# pragma pop_macro ("signal") +# pragma pop_macro ("slot") + #elif defined(__GNUC__) // GNU C++ @@ -77,6 +81,10 @@ # pragma GCC diagnostic pop +# pragma pop_macro ("emit") +# pragma pop_macro ("signal") +# pragma pop_macro ("slot") + #elif defined(__KCC) // Kai C++ diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/push_options.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/push_options.hpp index d658413223..1a709cb1d4 100644 --- a/contrib/restricted/boost/asio/include/boost/asio/detail/push_options.hpp +++ b/contrib/restricted/boost/asio/include/boost/asio/detail/push_options.hpp @@ -57,6 +57,15 @@ # pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" # endif // (__clang_major__ >= 6) +# pragma push_macro ("emit") +# undef emit + +# pragma push_macro ("signal") +# undef signal + +# pragma push_macro ("slot") +# undef slot + #elif defined(__GNUC__) // GNU C++ @@ -92,6 +101,15 @@ # pragma GCC diagnostic ignored "-Wimplicit-fallthrough" # endif // (__GNUC__ >= 7) +# pragma push_macro ("emit") +# undef emit + +# pragma push_macro ("signal") +# undef signal + +# pragma push_macro ("slot") +# undef slot + #elif defined(__KCC) // Kai C++ @@ -188,4 +206,13 @@ # endif # endif +# pragma push_macro ("emit") +# undef emit + +# pragma push_macro ("signal") +# undef signal + +# pragma push_macro ("slot") +# undef slot + #endif diff --git a/contrib/restricted/boost/asio/ya.make b/contrib/restricted/boost/asio/ya.make index 170c2cb18b..58792d2350 100644 --- a/contrib/restricted/boost/asio/ya.make +++ b/contrib/restricted/boost/asio/ya.make @@ -9,12 +9,13 @@ LICENSE( LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(1.76.0) +VERSION(1.77.0) -ORIGINAL_SOURCE(https://github.com/boostorg/asio/archive/boost-1.76.0.tar.gz) +ORIGINAL_SOURCE(https://github.com/boostorg/asio/archive/boost-1.77.0.tar.gz) PEERDIR( contrib/libs/openssl + contrib/restricted/boost/align contrib/restricted/boost/array contrib/restricted/boost/assert contrib/restricted/boost/bind |