diff options
author | bugaevskiy <bugaevskiy@yandex-team.com> | 2022-08-07 00:24:46 +0300 |
---|---|---|
committer | bugaevskiy <bugaevskiy@yandex-team.com> | 2022-08-07 00:24:46 +0300 |
commit | 8f976894a19f7f4ce4ad7a2fe01acaf18590eb95 (patch) | |
tree | 416edee6675adc7008deab9c911471c06166e587 | |
parent | 67b6e12f2297ad3c0127aa42721b8f798f496c13 (diff) | |
download | ydb-8f976894a19f7f4ce4ad7a2fe01acaf18590eb95.tar.gz |
Reimport boost/conversion as a separate project
-rw-r--r-- | CMakeLists.darwin.txt | 7 | ||||
-rw-r--r-- | CMakeLists.linux.txt | 7 | ||||
-rw-r--r-- | contrib/restricted/boost/CMakeLists.txt | 1 | ||||
-rw-r--r-- | contrib/restricted/boost/boost/polymorphic_pointer_cast.hpp | 78 | ||||
-rw-r--r-- | contrib/restricted/boost/conversion/CMakeLists.txt | 23 | ||||
-rw-r--r-- | contrib/restricted/boost/conversion/README.md | 16 | ||||
-rw-r--r-- | contrib/restricted/boost/conversion/include/boost/implicit_cast.hpp (renamed from contrib/restricted/boost/boost/implicit_cast.hpp) | 0 | ||||
-rw-r--r-- | contrib/restricted/boost/conversion/include/boost/polymorphic_cast.hpp (renamed from contrib/restricted/boost/boost/polymorphic_cast.hpp) | 0 |
8 files changed, 48 insertions, 84 deletions
diff --git a/CMakeLists.darwin.txt b/CMakeLists.darwin.txt index 04e11306a49..9dc4a2e1d91 100644 --- a/CMakeLists.darwin.txt +++ b/CMakeLists.darwin.txt @@ -366,12 +366,14 @@ add_subdirectory(contrib/restricted/boost/predef) add_subdirectory(contrib/restricted/boost/preprocessor) add_subdirectory(contrib/restricted/boost/type_traits) add_subdirectory(contrib/restricted/boost/utility) +add_subdirectory(contrib/restricted/boost/conversion) +add_subdirectory(contrib/restricted/boost/smart_ptr) +add_subdirectory(contrib/restricted/boost/move) +add_subdirectory(contrib/restricted/boost/typeof) add_subdirectory(contrib/restricted/boost/endian) add_subdirectory(contrib/restricted/boost/system) add_subdirectory(contrib/restricted/boost/winapi) add_subdirectory(contrib/restricted/boost/exception) -add_subdirectory(contrib/restricted/boost/smart_ptr) -add_subdirectory(contrib/restricted/boost/move) add_subdirectory(contrib/restricted/boost/tuple) add_subdirectory(contrib/restricted/boost/integer) add_subdirectory(contrib/restricted/boost/io) @@ -379,7 +381,6 @@ add_subdirectory(contrib/restricted/boost/logic) add_subdirectory(contrib/restricted/boost/mp11) add_subdirectory(contrib/restricted/boost/polygon) add_subdirectory(contrib/restricted/boost/rational) -add_subdirectory(contrib/restricted/boost/typeof) add_subdirectory(contrib/restricted/boost/vmd) add_subdirectory(contrib/restricted/fast_float) add_subdirectory(contrib/restricted/thrift) diff --git a/CMakeLists.linux.txt b/CMakeLists.linux.txt index e7731356f81..83fcb59a9bf 100644 --- a/CMakeLists.linux.txt +++ b/CMakeLists.linux.txt @@ -369,12 +369,14 @@ add_subdirectory(contrib/restricted/boost/predef) add_subdirectory(contrib/restricted/boost/preprocessor) add_subdirectory(contrib/restricted/boost/type_traits) add_subdirectory(contrib/restricted/boost/utility) +add_subdirectory(contrib/restricted/boost/conversion) +add_subdirectory(contrib/restricted/boost/smart_ptr) +add_subdirectory(contrib/restricted/boost/move) +add_subdirectory(contrib/restricted/boost/typeof) add_subdirectory(contrib/restricted/boost/endian) add_subdirectory(contrib/restricted/boost/system) add_subdirectory(contrib/restricted/boost/winapi) add_subdirectory(contrib/restricted/boost/exception) -add_subdirectory(contrib/restricted/boost/smart_ptr) -add_subdirectory(contrib/restricted/boost/move) add_subdirectory(contrib/restricted/boost/tuple) add_subdirectory(contrib/restricted/boost/integer) add_subdirectory(contrib/restricted/boost/io) @@ -382,7 +384,6 @@ add_subdirectory(contrib/restricted/boost/logic) add_subdirectory(contrib/restricted/boost/mp11) add_subdirectory(contrib/restricted/boost/polygon) add_subdirectory(contrib/restricted/boost/rational) -add_subdirectory(contrib/restricted/boost/typeof) add_subdirectory(contrib/restricted/boost/vmd) add_subdirectory(contrib/restricted/fast_float) add_subdirectory(contrib/restricted/thrift) diff --git a/contrib/restricted/boost/CMakeLists.txt b/contrib/restricted/boost/CMakeLists.txt index ac5f92169ac..82b9a3c5555 100644 --- a/contrib/restricted/boost/CMakeLists.txt +++ b/contrib/restricted/boost/CMakeLists.txt @@ -19,6 +19,7 @@ target_link_libraries(contrib-restricted-boost INTERFACE restricted-boost-bind restricted-boost-concept_check restricted-boost-config + restricted-boost-conversion restricted-boost-core restricted-boost-endian restricted-boost-exception diff --git a/contrib/restricted/boost/boost/polymorphic_pointer_cast.hpp b/contrib/restricted/boost/boost/polymorphic_pointer_cast.hpp deleted file mode 100644 index 9c8b5ca586a..00000000000 --- a/contrib/restricted/boost/boost/polymorphic_pointer_cast.hpp +++ /dev/null @@ -1,78 +0,0 @@ -// boost polymorphic_pointer_cast.hpp header file ----------------------------------------------// -// (C) Copyright Boris Rasin and Antony Polukhin 2014-2015. -// 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) - -// See http://www.boost.org/libs/conversion for Documentation. - -#ifndef BOOST_CONVERSION_POLYMORPHIC_POINTER_CAST_HPP -#define BOOST_CONVERSION_POLYMORPHIC_POINTER_CAST_HPP - -# include <boost/config.hpp> -# include <boost/assert.hpp> -# include <boost/pointer_cast.hpp> -# include <boost/throw_exception.hpp> -# include <boost/utility/declval.hpp> -# ifdef BOOST_NO_CXX11_DECLTYPE -# include <boost/typeof/typeof.hpp> -# endif - -#ifdef BOOST_HAS_PRAGMA_ONCE -# pragma once -#endif - -namespace boost -{ -// See the documentation for descriptions of how to choose between -// static_pointer_cast<>, dynamic_pointer_cast<>, polymorphic_pointer_cast<> and polymorphic_pointer_downcast<> - -// polymorphic_pointer_downcast --------------------------------------------// - - // BOOST_ASSERT() checked polymorphic downcast. Crosscasts prohibited. - // Supports any type with static_pointer_cast/dynamic_pointer_cast functions: - // built-in pointers, std::shared_ptr, boost::shared_ptr, boost::intrusive_ptr, etc. - - // WARNING: Because this cast uses BOOST_ASSERT(), it violates - // the One Definition Rule if used in multiple translation units - // where BOOST_DISABLE_ASSERTS, BOOST_ENABLE_ASSERT_HANDLER - // NDEBUG are defined inconsistently. - - // Contributed by Boris Rasin - - namespace detail - { - template <typename Target, typename Source> - struct dynamic_pointer_cast_result - { -#ifdef BOOST_NO_CXX11_DECLTYPE - BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, dynamic_pointer_cast<Target>(boost::declval<Source>())) - typedef typename nested::type type; -#else - typedef decltype(dynamic_pointer_cast<Target>(boost::declval<Source>())) type; -#endif - }; - } - - template <typename Target, typename Source> - inline typename detail::dynamic_pointer_cast_result<Target, Source>::type - polymorphic_pointer_downcast (const Source& x) - { - BOOST_ASSERT(dynamic_pointer_cast<Target> (x) == x); - return static_pointer_cast<Target> (x); - } - - template <typename Target, typename Source> - inline typename detail::dynamic_pointer_cast_result<Target, Source>::type - polymorphic_pointer_cast (const Source& x) - { - typename detail::dynamic_pointer_cast_result<Target, Source>::type tmp - = dynamic_pointer_cast<Target> (x); - if ( !tmp ) boost::throw_exception( std::bad_cast() ); - - return tmp; - } - -} // namespace boost - -#endif // BOOST_CONVERSION_POLYMORPHIC_POINTER_CAST_HPP diff --git a/contrib/restricted/boost/conversion/CMakeLists.txt b/contrib/restricted/boost/conversion/CMakeLists.txt new file mode 100644 index 00000000000..e363f6cefa0 --- /dev/null +++ b/contrib/restricted/boost/conversion/CMakeLists.txt @@ -0,0 +1,23 @@ + +# This file was gererated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + + +add_library(restricted-boost-conversion INTERFACE) +target_include_directories(restricted-boost-conversion INTERFACE + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/conversion/include +) +target_link_libraries(restricted-boost-conversion INTERFACE + contrib-libs-cxxsupp + yutil + restricted-boost-assert + restricted-boost-config + restricted-boost-smart_ptr + restricted-boost-throw_exception + restricted-boost-type_traits + restricted-boost-typeof +) diff --git a/contrib/restricted/boost/conversion/README.md b/contrib/restricted/boost/conversion/README.md new file mode 100644 index 00000000000..2cd1b9d49f8 --- /dev/null +++ b/contrib/restricted/boost/conversion/README.md @@ -0,0 +1,16 @@ +# [Boost.Conversion](http://boost.org/libs/conversion) +Boost.Conversion is one of the [Boost C++ Libraries](http://github.com/boostorg). This library improves program safety and clarity by performing otherwise messy conversions. + +### Test results + +@ | Build | Tests coverage | More info +----------------|-------------- | -------------- |----------- +Develop branch: | [](https://travis-ci.org/apolukhin/conversion) [](https://ci.appveyor.com/project/apolukhin/conversion/branch/develop) | [](https://coveralls.io/r/apolukhin/conversion?branch=develop) | [details...](http://www.boost.org/development/tests/develop/developer/conversion.html) +Master branch: | [](https://travis-ci.org/apolukhin/conversion) [](https://ci.appveyor.com/project/apolukhin/conversion/branch/master) | [](https://coveralls.io/r/apolukhin/conversion?branch=master) | [details...](http://www.boost.org/development/tests/master/developer/conversion.html) + + +[Open Issues](https://svn.boost.org/trac/boost/query?status=!closed&component=conversion&or&status=!closed&component=lexical_cast) + +### License + +Distributed under the [Boost Software License, Version 1.0](http://boost.org/LICENSE_1_0.txt). diff --git a/contrib/restricted/boost/boost/implicit_cast.hpp b/contrib/restricted/boost/conversion/include/boost/implicit_cast.hpp index d82db7628ee..d82db7628ee 100644 --- a/contrib/restricted/boost/boost/implicit_cast.hpp +++ b/contrib/restricted/boost/conversion/include/boost/implicit_cast.hpp diff --git a/contrib/restricted/boost/boost/polymorphic_cast.hpp b/contrib/restricted/boost/conversion/include/boost/polymorphic_cast.hpp index 70afa6be2ee..70afa6be2ee 100644 --- a/contrib/restricted/boost/boost/polymorphic_cast.hpp +++ b/contrib/restricted/boost/conversion/include/boost/polymorphic_cast.hpp |