aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbugaevskiy <bugaevskiy@yandex-team.com>2022-08-14 11:33:51 +0300
committerbugaevskiy <bugaevskiy@yandex-team.com>2022-08-14 11:33:51 +0300
commit8fdc13165624f0b78a16781f1d0d53d542a9aa1e (patch)
tree4107c82f4cbdb2b4f0d36b247d20176d6381d04e
parent93966fa6417966ba8215e5b98ea8fc7db28be9a8 (diff)
downloadydb-8fdc13165624f0b78a16781f1d0d53d542a9aa1e.tar.gz
Reimport boost/lexical_cast as a separate project
-rw-r--r--CMakeLists.darwin.txt1
-rw-r--r--CMakeLists.linux.txt1
-rw-r--r--contrib/restricted/boost/CMakeLists.txt1
-rw-r--r--contrib/restricted/boost/boost/lexical_cast/lexical_cast_old.hpp176
-rw-r--r--contrib/restricted/boost/lexical_cast/CMakeLists.txt29
-rw-r--r--contrib/restricted/boost/lexical_cast/README.md16
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/detail/basic_pointerbuf.hpp (renamed from contrib/restricted/boost/boost/detail/basic_pointerbuf.hpp)0
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/detail/lcast_precision.hpp (renamed from contrib/restricted/boost/boost/detail/lcast_precision.hpp)0
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/lexical_cast.hpp (renamed from contrib/restricted/boost/boost/lexical_cast.hpp)0
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/bad_lexical_cast.hpp (renamed from contrib/restricted/boost/boost/lexical_cast/bad_lexical_cast.hpp)0
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/converter_lexical.hpp (renamed from contrib/restricted/boost/boost/lexical_cast/detail/converter_lexical.hpp)0
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/converter_lexical_streams.hpp (renamed from contrib/restricted/boost/boost/lexical_cast/detail/converter_lexical_streams.hpp)0
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/converter_numeric.hpp (renamed from contrib/restricted/boost/boost/lexical_cast/detail/converter_numeric.hpp)0
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/inf_nan.hpp (renamed from contrib/restricted/boost/boost/lexical_cast/detail/inf_nan.hpp)0
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/is_character.hpp (renamed from contrib/restricted/boost/boost/lexical_cast/detail/is_character.hpp)0
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/lcast_char_constants.hpp (renamed from contrib/restricted/boost/boost/lexical_cast/detail/lcast_char_constants.hpp)0
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/lcast_unsigned_converters.hpp (renamed from contrib/restricted/boost/boost/lexical_cast/detail/lcast_unsigned_converters.hpp)0
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/widest_char.hpp (renamed from contrib/restricted/boost/boost/lexical_cast/detail/widest_char.hpp)0
-rw-r--r--contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/try_lexical_convert.hpp (renamed from contrib/restricted/boost/boost/lexical_cast/try_lexical_convert.hpp)0
19 files changed, 48 insertions, 176 deletions
diff --git a/CMakeLists.darwin.txt b/CMakeLists.darwin.txt
index c93e693d61..3060d4f91e 100644
--- a/CMakeLists.darwin.txt
+++ b/CMakeLists.darwin.txt
@@ -319,6 +319,7 @@ add_subdirectory(contrib/restricted/boost/interval)
add_subdirectory(contrib/restricted/boost/logic)
add_subdirectory(contrib/restricted/boost/io)
add_subdirectory(contrib/restricted/boost/lambda)
+add_subdirectory(contrib/restricted/boost/lexical_cast)
add_subdirectory(contrib/restricted/boost/mp11)
add_subdirectory(contrib/restricted/boost/multi_array)
add_subdirectory(contrib/restricted/boost/functional)
diff --git a/CMakeLists.linux.txt b/CMakeLists.linux.txt
index 0ada1fd197..f7c616d1f2 100644
--- a/CMakeLists.linux.txt
+++ b/CMakeLists.linux.txt
@@ -322,6 +322,7 @@ add_subdirectory(contrib/restricted/boost/interval)
add_subdirectory(contrib/restricted/boost/logic)
add_subdirectory(contrib/restricted/boost/io)
add_subdirectory(contrib/restricted/boost/lambda)
+add_subdirectory(contrib/restricted/boost/lexical_cast)
add_subdirectory(contrib/restricted/boost/mp11)
add_subdirectory(contrib/restricted/boost/multi_array)
add_subdirectory(contrib/restricted/boost/functional)
diff --git a/contrib/restricted/boost/CMakeLists.txt b/contrib/restricted/boost/CMakeLists.txt
index 3daf1fee6e..5474dbea64 100644
--- a/contrib/restricted/boost/CMakeLists.txt
+++ b/contrib/restricted/boost/CMakeLists.txt
@@ -40,6 +40,7 @@ target_link_libraries(contrib-restricted-boost INTERFACE
restricted-boost-io
restricted-boost-iterator
restricted-boost-lambda
+ restricted-boost-lexical_cast
restricted-boost-move
restricted-boost-mp11
restricted-boost-mpl
diff --git a/contrib/restricted/boost/boost/lexical_cast/lexical_cast_old.hpp b/contrib/restricted/boost/boost/lexical_cast/lexical_cast_old.hpp
deleted file mode 100644
index b48bf1f55c..0000000000
--- a/contrib/restricted/boost/boost/lexical_cast/lexical_cast_old.hpp
+++ /dev/null
@@ -1,176 +0,0 @@
-// Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2014.
-//
-// 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)
-//
-// what: lexical_cast custom keyword cast
-// who: contributed by Kevlin Henney,
-// enhanced with contributions from Terje Slettebo,
-// with additional fixes and suggestions from Gennaro Prota,
-// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
-
-#ifndef BOOST_LEXICAL_CAST_LEXICAL_CAST_OLD_HPP
-#define BOOST_LEXICAL_CAST_LEXICAL_CAST_OLD_HPP
-
-#include <boost/config.hpp>
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
-#define BOOST_LCAST_NO_WCHAR_T
-#endif
-
-#include <climits>
-#include <cstddef>
-#include <string>
-#include <cstring>
-#include <cstdio>
-#include <boost/limits.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/type_traits/is_pointer.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/detail/lcast_precision.hpp>
-#include <boost/detail/workaround.hpp>
-
-#ifdef BOOST_NO_STRINGSTREAM
-#include <strstream>
-#else
-#include <sstream>
-#endif
-
-#include <boost/lexical_cast/bad_lexical_cast.hpp>
-#include <boost/lexical_cast/detail/widest_char.hpp>
-
-namespace boost {
- namespace detail
- {
-
- // selectors for choosing stream character type
- template<typename Type>
- struct stream_char
- {
- typedef char type;
- };
-
-#ifndef BOOST_LCAST_NO_WCHAR_T
-#ifndef BOOST_NO_INTRINSIC_WCHAR_T
- template<>
- struct stream_char<wchar_t>
- {
- typedef wchar_t type;
- };
-#endif
-
- template<>
- struct stream_char<wchar_t *>
- {
- typedef wchar_t type;
- };
-
- template<>
- struct stream_char<const wchar_t *>
- {
- typedef wchar_t type;
- };
-
- template<>
- struct stream_char<std::wstring>
- {
- typedef wchar_t type;
- };
-#endif
-
- // stream wrapper for handling lexical conversions
- template<typename Target, typename Source, typename Traits>
- class lexical_stream
- {
- private:
- typedef typename widest_char<
- typename stream_char<Target>::type,
- typename stream_char<Source>::type>::type char_type;
-
- typedef Traits traits_type;
-
- public:
- lexical_stream(char_type* = 0, char_type* = 0)
- {
- stream.unsetf(std::ios::skipws);
- lcast_set_precision(stream, static_cast<Source*>(0), static_cast<Target*>(0) );
- }
- ~lexical_stream()
- {
- #if defined(BOOST_NO_STRINGSTREAM)
- stream.freeze(false);
- #endif
- }
- bool operator<<(const Source &input)
- {
- return !(stream << input).fail();
- }
- template<typename InputStreamable>
- bool operator>>(InputStreamable &output)
- {
- return !is_pointer<InputStreamable>::value &&
- stream >> output &&
- stream.get() == traits_type::eof();
- }
-
- bool operator>>(std::string &output)
- {
- #if defined(BOOST_NO_STRINGSTREAM)
- stream << '\0';
- #endif
- stream.str().swap(output);
- return true;
- }
- #ifndef BOOST_LCAST_NO_WCHAR_T
- bool operator>>(std::wstring &output)
- {
- stream.str().swap(output);
- return true;
- }
- #endif
-
- private:
- #if defined(BOOST_NO_STRINGSTREAM)
- std::strstream stream;
- #elif defined(BOOST_NO_STD_LOCALE)
- std::stringstream stream;
- #else
- std::basic_stringstream<char_type,traits_type> stream;
- #endif
- };
- }
-
- // call-by-value fallback version (deprecated)
-
- template<typename Target, typename Source>
- Target lexical_cast(Source arg)
- {
- typedef typename detail::widest_char<
- BOOST_DEDUCED_TYPENAME detail::stream_char<Target>::type
- , BOOST_DEDUCED_TYPENAME detail::stream_char<Source>::type
- >::type char_type;
-
- typedef std::char_traits<char_type> traits;
- detail::lexical_stream<Target, Source, traits> interpreter;
- Target result;
-
- if(!(interpreter << arg && interpreter >> result))
- boost::conversion::detail::throw_bad_cast<Source, Target>();
- return result;
- }
-
-} // namespace boost
-
-#undef BOOST_LCAST_NO_WCHAR_T
-
-#endif // BOOST_LEXICAL_CAST_LEXICAL_CAST_OLD_HPP
-
diff --git a/contrib/restricted/boost/lexical_cast/CMakeLists.txt b/contrib/restricted/boost/lexical_cast/CMakeLists.txt
new file mode 100644
index 0000000000..8d670911c4
--- /dev/null
+++ b/contrib/restricted/boost/lexical_cast/CMakeLists.txt
@@ -0,0 +1,29 @@
+
+# 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-lexical_cast INTERFACE)
+target_include_directories(restricted-boost-lexical_cast INTERFACE
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/lexical_cast/include
+)
+target_link_libraries(restricted-boost-lexical_cast INTERFACE
+ contrib-libs-cxxsupp
+ yutil
+ restricted-boost-array
+ restricted-boost-assert
+ restricted-boost-config
+ restricted-boost-container
+ restricted-boost-core
+ restricted-boost-integer
+ restricted-boost-mpl
+ restricted-boost-numeric_conversion
+ restricted-boost-range
+ restricted-boost-static_assert
+ restricted-boost-throw_exception
+ restricted-boost-type_traits
+)
diff --git a/contrib/restricted/boost/lexical_cast/README.md b/contrib/restricted/boost/lexical_cast/README.md
new file mode 100644
index 0000000000..4a804f4459
--- /dev/null
+++ b/contrib/restricted/boost/lexical_cast/README.md
@@ -0,0 +1,16 @@
+# [Boost.LexicalCast](http://boost.org/libs/lexical_cast)
+Boost.LexicalCast is one of the [Boost C++ Libraries](http://github.com/boostorg). This library is meant for general literal text conversions, such as an int represented a string, or vice-versa.
+
+### Test results
+
+@ | Build | Tests coverage | More info
+----------------|-------------- | -------------- |-----------
+Develop branch: | [![Build Status](https://travis-ci.org/apolukhin/lexical_cast.svg?branch=develop)](https://travis-ci.org/apolukhin/lexical_cast) [![Build status](https://ci.appveyor.com/api/projects/status/mwwanh1bpsnuv38h/branch/develop?svg=true)](https://ci.appveyor.com/project/apolukhin/lexical-cast/branch/develop) | [![Coverage Status](https://coveralls.io/repos/apolukhin/lexical_cast/badge.png?branch=develop)](https://coveralls.io/r/apolukhin/lexical_cast?branch=develop) | [details...](http://www.boost.org/development/tests/develop/developer/lexical_cast.html)
+Master branch: | [![Build Status](https://travis-ci.org/apolukhin/lexical_cast.svg?branch=master)](https://travis-ci.org/apolukhin/lexical_cast) [![Build status](https://ci.appveyor.com/api/projects/status/mwwanh1bpsnuv38h/branch/master?svg=true)](https://ci.appveyor.com/project/apolukhin/lexical-cast/branch/master) | [![Coverage Status](https://coveralls.io/repos/apolukhin/lexical_cast/badge.png?branch=master)](https://coveralls.io/r/apolukhin/lexical_cast?branch=master) | [details...](http://www.boost.org/development/tests/master/developer/lexical_cast.html)
+
+
+[Open Issues](https://svn.boost.org/trac/boost/query?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/detail/basic_pointerbuf.hpp b/contrib/restricted/boost/lexical_cast/include/boost/detail/basic_pointerbuf.hpp
index 85618f92ab..85618f92ab 100644
--- a/contrib/restricted/boost/boost/detail/basic_pointerbuf.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/detail/basic_pointerbuf.hpp
diff --git a/contrib/restricted/boost/boost/detail/lcast_precision.hpp b/contrib/restricted/boost/lexical_cast/include/boost/detail/lcast_precision.hpp
index 2be88fd87f..2be88fd87f 100644
--- a/contrib/restricted/boost/boost/detail/lcast_precision.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/detail/lcast_precision.hpp
diff --git a/contrib/restricted/boost/boost/lexical_cast.hpp b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast.hpp
index 3dc21f88a4..3dc21f88a4 100644
--- a/contrib/restricted/boost/boost/lexical_cast.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast.hpp
diff --git a/contrib/restricted/boost/boost/lexical_cast/bad_lexical_cast.hpp b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/bad_lexical_cast.hpp
index 093121565e..093121565e 100644
--- a/contrib/restricted/boost/boost/lexical_cast/bad_lexical_cast.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/bad_lexical_cast.hpp
diff --git a/contrib/restricted/boost/boost/lexical_cast/detail/converter_lexical.hpp b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/converter_lexical.hpp
index fd866d84e5..fd866d84e5 100644
--- a/contrib/restricted/boost/boost/lexical_cast/detail/converter_lexical.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/converter_lexical.hpp
diff --git a/contrib/restricted/boost/boost/lexical_cast/detail/converter_lexical_streams.hpp b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/converter_lexical_streams.hpp
index 3758a9cc21..3758a9cc21 100644
--- a/contrib/restricted/boost/boost/lexical_cast/detail/converter_lexical_streams.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/converter_lexical_streams.hpp
diff --git a/contrib/restricted/boost/boost/lexical_cast/detail/converter_numeric.hpp b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/converter_numeric.hpp
index f50e2ca0fb..f50e2ca0fb 100644
--- a/contrib/restricted/boost/boost/lexical_cast/detail/converter_numeric.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/converter_numeric.hpp
diff --git a/contrib/restricted/boost/boost/lexical_cast/detail/inf_nan.hpp b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/inf_nan.hpp
index c10457ecd2..c10457ecd2 100644
--- a/contrib/restricted/boost/boost/lexical_cast/detail/inf_nan.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/inf_nan.hpp
diff --git a/contrib/restricted/boost/boost/lexical_cast/detail/is_character.hpp b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/is_character.hpp
index 732c39f8e8..732c39f8e8 100644
--- a/contrib/restricted/boost/boost/lexical_cast/detail/is_character.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/is_character.hpp
diff --git a/contrib/restricted/boost/boost/lexical_cast/detail/lcast_char_constants.hpp b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/lcast_char_constants.hpp
index fd651ee3e9..fd651ee3e9 100644
--- a/contrib/restricted/boost/boost/lexical_cast/detail/lcast_char_constants.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/lcast_char_constants.hpp
diff --git a/contrib/restricted/boost/boost/lexical_cast/detail/lcast_unsigned_converters.hpp b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/lcast_unsigned_converters.hpp
index 268961ee72..268961ee72 100644
--- a/contrib/restricted/boost/boost/lexical_cast/detail/lcast_unsigned_converters.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/lcast_unsigned_converters.hpp
diff --git a/contrib/restricted/boost/boost/lexical_cast/detail/widest_char.hpp b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/widest_char.hpp
index 013aaf119d..013aaf119d 100644
--- a/contrib/restricted/boost/boost/lexical_cast/detail/widest_char.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/detail/widest_char.hpp
diff --git a/contrib/restricted/boost/boost/lexical_cast/try_lexical_convert.hpp b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/try_lexical_convert.hpp
index b079fd42ae..b079fd42ae 100644
--- a/contrib/restricted/boost/boost/lexical_cast/try_lexical_convert.hpp
+++ b/contrib/restricted/boost/lexical_cast/include/boost/lexical_cast/try_lexical_convert.hpp