diff options
author | robot-contrib <[email protected]> | 2025-08-26 11:39:42 +0300 |
---|---|---|
committer | robot-contrib <[email protected]> | 2025-08-26 12:09:12 +0300 |
commit | 131a0ea0a9b8cb9093afa84882b2a1fbb05fcddd (patch) | |
tree | f233729ca78f0f91692fd185b93e8bb9ed005c72 | |
parent | 949e2bccdbf17c2ecd3f7c98e3d515d838bed73e (diff) |
Update contrib/restricted/boost/type_index to 1.89.0
commit_hash:10cd7de8e3e87ce32286ad31a6047e59d1172c52
19 files changed, 183 insertions, 22 deletions
diff --git a/contrib/restricted/boost/type_index/.yandex_meta/default.nix b/contrib/restricted/boost/type_index/.yandex_meta/default.nix index 43b167dbba0..9f8d3b86184 100644 --- a/contrib/restricted/boost/type_index/.yandex_meta/default.nix +++ b/contrib/restricted/boost/type_index/.yandex_meta/default.nix @@ -1,13 +1,13 @@ self: super: with self; { boost_type_index = stdenv.mkDerivation rec { pname = "boost_type_index"; - version = "1.88.0"; + version = "1.89.0"; src = fetchFromGitHub { owner = "boostorg"; repo = "type_index"; rev = "boost-${version}"; - hash = "sha256-kn9AVs2/Mled435VB2TaHjgGPIFON9DR2E0kGv1CXfY="; + hash = "sha256-3njyTPlLV79AAeFoHXSBVFy98k3DFTZpfnIfnWOI4to="; }; }; } diff --git a/contrib/restricted/boost/type_index/.yandex_meta/devtools.copyrights.report b/contrib/restricted/boost/type_index/.yandex_meta/devtools.copyrights.report index 20f489451a7..915f8af6ac8 100644 --- a/contrib/restricted/boost/type_index/.yandex_meta/devtools.copyrights.report +++ b/contrib/restricted/boost/type_index/.yandex_meta/devtools.copyrights.report @@ -55,6 +55,7 @@ BELONGS ya.make Match type : COPYRIGHT Files with this license: include/boost/type_index/ctti_type_index.hpp [2:2] + include/boost/type_index/detail/config.hpp [2:2] include/boost/type_index/detail/ctti_register_class.hpp [2:2] include/boost/type_index/detail/stl_register_class.hpp [2:2] include/boost/type_index/stl_type_index.hpp [2:2] diff --git a/contrib/restricted/boost/type_index/.yandex_meta/devtools.licenses.report b/contrib/restricted/boost/type_index/.yandex_meta/devtools.licenses.report index 703fa2382eb..0937ed560dd 100644 --- a/contrib/restricted/boost/type_index/.yandex_meta/devtools.licenses.report +++ b/contrib/restricted/boost/type_index/.yandex_meta/devtools.licenses.report @@ -47,6 +47,7 @@ BELONGS ya.make include/boost/type_index.hpp [4:5] include/boost/type_index/ctti_type_index.hpp [5:6] include/boost/type_index/detail/compile_time_type_info.hpp [5:6] + include/boost/type_index/detail/config.hpp [5:6] include/boost/type_index/detail/ctti_register_class.hpp [5:6] include/boost/type_index/detail/stl_register_class.hpp [5:6] include/boost/type_index/runtime_cast.hpp [5:6] diff --git a/contrib/restricted/boost/type_index/include/boost/type_index.hpp b/contrib/restricted/boost/type_index/include/boost/type_index.hpp index 9bebff17486..40f42737a09 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index.hpp @@ -14,7 +14,7 @@ /// By inclusion of this file most optimal type index classes will be included and used /// as a boost::typeindex::type_index and boost::typeindex::type_info. -#include <boost/config.hpp> +#include <boost/type_index/detail/config.hpp> #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once @@ -49,8 +49,12 @@ #define BOOST_TYPE_INDEX_REGISTER_CLASS #endif +#if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + namespace boost { namespace typeindex { +BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT + #if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) /// \def BOOST_TYPE_INDEX_FUNCTION_SIGNATURE @@ -257,9 +261,11 @@ inline type_index type_id_runtime(const T& runtime_val) noexcept { return type_index::type_id_runtime(runtime_val); } -}} // namespace boost::typeindex +BOOST_TYPE_INDEX_END_MODULE_EXPORT +}} // namespace boost::typeindex +#endif // #if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) #endif // BOOST_TYPE_INDEX_HPP diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/ctti_type_index.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/ctti_type_index.hpp index fac0a3cee5c..d6805947a3d 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/ctti_type_index.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/ctti_type_index.hpp @@ -18,12 +18,19 @@ /// It is used in situations when typeid() method is not available or /// BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro is defined. +#include <boost/type_index/detail/config.hpp> + +#if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #include <boost/type_index/type_index_facade.hpp> #include <boost/type_index/detail/compile_time_type_info.hpp> +#if !defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) #include <cstring> #include <type_traits> + #include <boost/container_hash/hash.hpp> +#endif #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once @@ -64,6 +71,8 @@ public: } // namespace detail +BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT + /// Helper method for getting detail::ctti_data of a template parameter T. template <class T> inline const detail::ctti_data& ctti_construct() noexcept { @@ -132,6 +141,8 @@ public: inline static ctti_type_index type_id_runtime(const T& variable) noexcept; }; +BOOST_TYPE_INDEX_END_MODULE_EXPORT + inline const ctti_type_index::type_info_t& ctti_type_index::type_info() const noexcept { return *reinterpret_cast<const detail::ctti_data*>(data_); @@ -197,8 +208,9 @@ inline std::size_t ctti_type_index::hash_code() const noexcept { return boost::hash_range(raw_name(), raw_name() + get_raw_name_length()); } - }} // namespace boost::typeindex +#endif // #if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #endif // BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/detail/compile_time_type_info.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/detail/compile_time_type_info.hpp index 95469bd247a..49f2ebe8a40 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/detail/compile_time_type_info.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/detail/compile_time_type_info.hpp @@ -13,10 +13,12 @@ /// \brief Contains helper macros and implementation details of boost::typeindex::ctti_type_index. /// Not intended for inclusion from user's code. -#include <boost/config.hpp> +#include <boost/type_index/detail/config.hpp> +#if !defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) #include <cstring> #include <type_traits> +#endif #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/detail/config.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/detail/config.hpp new file mode 100644 index 00000000000..041d5961d55 --- /dev/null +++ b/contrib/restricted/boost/type_index/include/boost/type_index/detail/config.hpp @@ -0,0 +1,32 @@ +// +// Copyright 2013-2025 Antony Polukhin. +// +// +// 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) +// + +#ifndef BOOST_TYPE_INDEX_DETAIL_CONFIG_HPP +#define BOOST_TYPE_INDEX_DETAIL_CONFIG_HPP + +#if !defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) +#include <boost/config.hpp> +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif +#endif + +#ifdef BOOST_TYPE_INDEX_INTERFACE_UNIT +# define BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT export { +# define BOOST_TYPE_INDEX_END_MODULE_EXPORT } +#else +# define BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT +# define BOOST_TYPE_INDEX_END_MODULE_EXPORT +#endif + +#if defined(BOOST_USE_MODULES) && !defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) +import boost.type_index; +#endif + +#endif // BOOST_TYPE_INDEX_DETAIL_CONFIG_HPP + diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/detail/ctti_register_class.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/detail/ctti_register_class.hpp index e004be0d679..b8dd905b94e 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/detail/ctti_register_class.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/detail/ctti_register_class.hpp @@ -19,15 +19,23 @@ # pragma once #endif +#if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + namespace boost { namespace typeindex { namespace detail { +BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT + template <class T> inline const ctti_data& ctti_construct_typeid_ref(const T*) noexcept { return boost::typeindex::ctti_construct<T>(); } +BOOST_TYPE_INDEX_END_MODULE_EXPORT + }}} // namespace boost::typeindex::detail +#endif // #if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + /// @cond #define BOOST_TYPE_INDEX_REGISTER_CLASS \ virtual const boost::typeindex::detail::ctti_data& boost_type_index_type_id_runtime_() const noexcept { \ diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/detail/stl_register_class.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/detail/stl_register_class.hpp index 0e44a2686d3..67b34f39ead 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/detail/stl_register_class.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/detail/stl_register_class.hpp @@ -19,15 +19,23 @@ # pragma once #endif +#if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + namespace boost { namespace typeindex { namespace detail { +BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT + template <class T> inline const stl_type_index::type_info_t& stl_construct_typeid_ref(const T*) noexcept { return typeid(T); } +BOOST_TYPE_INDEX_END_MODULE_EXPORT + }}} // namespace boost::typeindex::detail +#endif // #if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + /// @cond #define BOOST_TYPE_INDEX_REGISTER_CLASS \ virtual const boost::typeindex::stl_type_index::type_info_t& boost_type_index_type_id_runtime_() const noexcept { \ diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast.hpp index c72b11916b1..d1adccfab31 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast.hpp @@ -9,6 +9,8 @@ #ifndef BOOST_TYPE_INDEX_RUNTIME_CAST_HPP #define BOOST_TYPE_INDEX_RUNTIME_CAST_HPP +#include <boost/type_index/detail/config.hpp> + /// \file runtime_cast.hpp /// \brief Contains the basic utilities necessary to fully emulate /// dynamic_cast for language level constructs (raw pointers and references). diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/boost_shared_ptr_cast.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/boost_shared_ptr_cast.hpp index 2664c0153c3..a1af74e6717 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/boost_shared_ptr_cast.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/boost_shared_ptr_cast.hpp @@ -13,21 +13,25 @@ /// \brief Contains the overload of boost::typeindex::runtime_pointer_cast for /// boost::shared_ptr types. +#include <boost/type_index/detail/config.hpp> + +#if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #include <boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp> +#if !defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) #include <type_traits> +#endif #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif -namespace boost { - template<class T> class shared_ptr; -} - namespace boost { namespace typeindex { -/// \brief Creates a new instance of std::shared_ptr whose stored pointer is obtained from u's +BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT + +/// \brief Creates a new instance of smart pointer whose stored pointer is obtained from u's /// stored pointer using a runtime_cast. /// /// The new shared_ptr will share ownership with u, except that it is empty if the runtime_cast @@ -37,14 +41,18 @@ namespace boost { namespace typeindex { /// \return If there exists a valid conversion from U* to T*, returns a boost::shared_ptr<T> /// that points to an address suitably offset from u. /// If no such conversion exists, returns boost::shared_ptr<T>(); -template<typename T, typename U> -boost::shared_ptr<T> runtime_pointer_cast(boost::shared_ptr<U> const& u) { +template<typename T, typename U, template <class> class SmartPointer> +auto runtime_pointer_cast(SmartPointer<U> const& u) -> decltype(u.use_count(), SmartPointer<T>()) { T* value = detail::runtime_cast_impl<T>(u.get(), std::is_base_of<T, U>()); if(value) - return boost::shared_ptr<T>(u, value); - return boost::shared_ptr<T>(); + return SmartPointer<T>(u, value); + return SmartPointer<T>(); } +BOOST_TYPE_INDEX_END_MODULE_EXPORT + }} // namespace boost::typeindex +#endif // #if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #endif // BOOST_TYPE_INDEX_RUNTIME_CAST_BOOST_SHARED_PTR_CAST_HPP diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp index 12a1b0eae48..8b6ed5f99ea 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp @@ -19,7 +19,9 @@ #include <boost/type_index.hpp> +#if !defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) #include <type_traits> +#endif #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/pointer_cast.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/pointer_cast.hpp index e4f94c1382c..f30a6d53447 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/pointer_cast.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/pointer_cast.hpp @@ -12,16 +12,22 @@ /// \file pointer_class.hpp /// \brief Contains the function overloads of boost::typeindex::runtime_cast for /// pointer types. + +#include <boost/type_index/detail/config.hpp> + +#if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #include <boost/type_index.hpp> #include <boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp> - #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif namespace boost { namespace typeindex { +BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT + /// \brief Safely converts pointers to classes up, down, and sideways along the inheritance hierarchy. /// \tparam T The desired target type. Like dynamic_cast, must be a pointer to complete class type. /// \tparam U A complete class type of the source instance, u. @@ -68,6 +74,10 @@ T const* runtime_pointer_cast(U const* u) noexcept { return detail::runtime_cast_impl<T>(u, std::is_base_of<T, U>()); } +BOOST_TYPE_INDEX_END_MODULE_EXPORT + }} // namespace boost::typeindex +#endif // #if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #endif // BOOST_TYPE_INDEX_RUNTIME_CAST_POINTER_CAST_HPP diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/reference_cast.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/reference_cast.hpp index 674a289b002..08f997c72d3 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/reference_cast.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/reference_cast.hpp @@ -13,18 +13,27 @@ /// \brief Contains the overload of boost::typeindex::runtime_cast for /// reference types. +#include <boost/type_index/detail/config.hpp> + +#if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #include <boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp> -#include <boost/throw_exception.hpp> +#if !defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) #include <memory> #include <type_traits> +#include <boost/throw_exception.hpp> +#endif + #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif namespace boost { namespace typeindex { +BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT + /// \brief Indicates that runtime_cast was unable to perform the desired cast operation /// because the source instance was not also an instance of the target type. struct BOOST_SYMBOL_VISIBLE bad_runtime_cast : std::exception @@ -60,6 +69,10 @@ typename std::add_lvalue_reference<const T>::type runtime_cast(U const& u) { return *value; } +BOOST_TYPE_INDEX_END_MODULE_EXPORT + }} // namespace boost::typeindex +#endif // #if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #endif // BOOST_TYPE_INDEX_RUNTIME_CAST_REFERENCE_CAST_HPP diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/register_runtime_class.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/register_runtime_class.hpp index 957224e23a6..db45285c84e 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/register_runtime_class.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/register_runtime_class.hpp @@ -12,14 +12,21 @@ /// \file register_runtime_class.hpp /// \brief Contains the macros BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST and /// BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS + +#include <boost/type_index/detail/config.hpp> + #include <boost/type_index.hpp> +#if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif namespace boost { namespace typeindex { namespace detail { +BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT + template<typename T> inline type_index runtime_class_construct_type_id(T const*) { return boost::typeindex::type_id<T>(); @@ -39,8 +46,12 @@ const void* find_instance(boost::typeindex::type_index const& idx, const Self* s return boost::typeindex::detail::find_instance<OtherBases...>(idx, self); } +BOOST_TYPE_INDEX_END_MODULE_EXPORT + }}} // namespace boost::typeindex::detail +#endif // #if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + /// \def BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS /// \brief Macro used to make a class compatible with boost::typeindex::runtime_cast diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/std_shared_ptr_cast.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/std_shared_ptr_cast.hpp index 7b09db54d20..8fcdc173a30 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/std_shared_ptr_cast.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/runtime_cast/std_shared_ptr_cast.hpp @@ -13,8 +13,15 @@ /// \brief Contains the overload of boost::typeindex::runtime_pointer_cast for /// std::shared_ptr types. +#include <boost/type_index/detail/config.hpp> + +#if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #include <boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp> + +#if !defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) #include <memory> +#endif #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once @@ -22,6 +29,8 @@ namespace boost { namespace typeindex { +BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT + /// \brief Creates a new instance of std::shared_ptr whose stored pointer is obtained from u's /// stored pointer using a runtime_cast. /// @@ -40,6 +49,10 @@ std::shared_ptr<T> runtime_pointer_cast(std::shared_ptr<U> const& u) { return std::shared_ptr<T>(); } +BOOST_TYPE_INDEX_END_MODULE_EXPORT + }} // namespace boost::typeindex +#endif // #if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #endif // BOOST_TYPE_INDEX_RUNTIME_CAST_STD_SHARED_PTR_CAST_HPP diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/stl_type_index.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/stl_type_index.hpp index 680ef9a2b17..810339ac85e 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/stl_type_index.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/stl_type_index.hpp @@ -19,6 +19,10 @@ /// When typeid() is disabled or BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro /// is defined boost::typeindex::ctti is usually used instead of boost::typeindex::stl_type_index. +#include <boost/type_index/detail/config.hpp> + +#if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #include <boost/type_index/type_index_facade.hpp> // MSVC is capable of calling typeid(T) even when RTTI is off @@ -26,12 +30,15 @@ #error "File boost/type_index/stl_type_index.ipp is not usable when typeid() is not available." #endif +#if !defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) #include <typeinfo> #include <cstring> // std::strcmp, std::strlen, std::strstr #include <stdexcept> #include <type_traits> + #include <boost/throw_exception.hpp> #include <boost/core/demangle.hpp> +#endif #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once @@ -39,6 +46,8 @@ namespace boost { namespace typeindex { +BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT + /// \class stl_type_index /// This class is a wrapper around std::type_info, that workarounds issues and provides /// much more rich interface. \b For \b description \b of \b functions \b see type_index_facade. @@ -93,6 +102,8 @@ public: inline static stl_type_index type_id_runtime(const T& value) noexcept; }; +BOOST_TYPE_INDEX_END_MODULE_EXPORT + inline const stl_type_index::type_info_t& stl_type_index::type_info() const noexcept { return *data_; } @@ -111,7 +122,7 @@ inline const char* stl_type_index::name() const noexcept { } inline std::string stl_type_index::pretty_name() const { - static const char cvr_saver_name[] = "boost::typeindex::detail::cvr_saver<"; + static const char cvr_saver_name[] = "boost::typeindex::detail::cvr_saver"; static BOOST_CONSTEXPR_OR_CONST std::string::size_type cvr_saver_name_len = sizeof(cvr_saver_name) - 1; // In case of MSVC demangle() is a no-op, and name() already returns demangled name. @@ -131,6 +142,12 @@ inline std::string stl_type_index::pretty_name() const { if (b) { b += cvr_saver_name_len; + // Trim everuthing till '<'. In modules the name could be boost::typeindex::detail::[email protected]_index< + while (*b != '<') { // the string is zero terminated, we won't exceed the buffer size + ++ b; + } + ++b; + // Trim leading spaces while (*b == ' ') { // the string is zero terminated, we won't exceed the buffer size ++ b; @@ -231,4 +248,6 @@ inline stl_type_index stl_type_index::type_id_runtime(const T& value) noexcept { }} // namespace boost::typeindex +#endif // #if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #endif // BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/type_index_facade.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/type_index_facade.hpp index 891797ea95e..7e6261e84ae 100644 --- a/contrib/restricted/boost/type_index/include/boost/type_index/type_index_facade.hpp +++ b/contrib/restricted/boost/type_index/include/boost/type_index/type_index_facade.hpp @@ -9,19 +9,28 @@ #ifndef BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP #define BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP -#include <boost/config.hpp> -#include <boost/container_hash/hash_fwd.hpp> +#include <boost/type_index/detail/config.hpp> + +#if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + +#if !defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) #include <string> #include <cstring> #include <type_traits> #include <iosfwd> // for std::basic_ostream +#include <boost/config.hpp> +#include <boost/container_hash/hash_fwd.hpp> +#endif + #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif namespace boost { namespace typeindex { +BOOST_TYPE_INDEX_BEGIN_MODULE_EXPORT + /// \class type_index_facade /// /// This class takes care about the comparison operators, hash functions and @@ -274,7 +283,11 @@ inline std::size_t hash_value(const type_index_facade<Derived, TypeInfo>& lhs) n return static_cast<Derived const&>(lhs).hash_code(); } +BOOST_TYPE_INDEX_END_MODULE_EXPORT + }} // namespace boost::typeindex +#endif // #if !defined(BOOST_USE_MODULES) || defined(BOOST_TYPE_INDEX_INTERFACE_UNIT) + #endif // BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP diff --git a/contrib/restricted/boost/type_index/ya.make b/contrib/restricted/boost/type_index/ya.make index ad0b029b015..48b0b8cdfaf 100644 --- a/contrib/restricted/boost/type_index/ya.make +++ b/contrib/restricted/boost/type_index/ya.make @@ -6,9 +6,9 @@ LICENSE(BSL-1.0) LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(1.88.0) +VERSION(1.89.0) -ORIGINAL_SOURCE(https://github.com/boostorg/type_index/archive/boost-1.88.0.tar.gz) +ORIGINAL_SOURCE(https://github.com/boostorg/type_index/archive/boost-1.89.0.tar.gz) PEERDIR( contrib/restricted/boost/config |