aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbugaevskiy <bugaevskiy@yandex-team.com>2022-08-07 10:56:04 +0300
committerbugaevskiy <bugaevskiy@yandex-team.com>2022-08-07 10:56:04 +0300
commitda8658093ca88d0431aefa1b89782ced2206cac5 (patch)
tree8e572eafe4df89571159b204fabc0a9dd594b9f6
parent5107c0f42867ceecd643ee9bc10873a300405dbc (diff)
downloadydb-da8658093ca88d0431aefa1b89782ced2206cac5.tar.gz
Reimport boost/optional 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/optional/detail/experimental_traits.hpp98
-rw-r--r--contrib/restricted/boost/optional/CMakeLists.txt27
-rw-r--r--contrib/restricted/boost/optional/README.md15
-rw-r--r--contrib/restricted/boost/optional/include/boost/none.hpp (renamed from contrib/restricted/boost/boost/none.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/none_t.hpp (renamed from contrib/restricted/boost/boost/none_t.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional.hpp (renamed from contrib/restricted/boost/boost/optional.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional/bad_optional_access.hpp (renamed from contrib/restricted/boost/boost/optional/bad_optional_access.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional/detail/old_optional_implementation.hpp (renamed from contrib/restricted/boost/boost/optional/detail/old_optional_implementation.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional/detail/optional_aligned_storage.hpp (renamed from contrib/restricted/boost/boost/optional/detail/optional_aligned_storage.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional/detail/optional_config.hpp (renamed from contrib/restricted/boost/boost/optional/detail/optional_config.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional/detail/optional_factory_support.hpp (renamed from contrib/restricted/boost/boost/optional/detail/optional_factory_support.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional/detail/optional_reference_spec.hpp (renamed from contrib/restricted/boost/boost/optional/detail/optional_reference_spec.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional/detail/optional_relops.hpp (renamed from contrib/restricted/boost/boost/optional/detail/optional_relops.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional/detail/optional_swap.hpp (renamed from contrib/restricted/boost/boost/optional/detail/optional_swap.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional/detail/optional_trivially_copyable_base.hpp (renamed from contrib/restricted/boost/boost/optional/detail/optional_trivially_copyable_base.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional/optional.hpp (renamed from contrib/restricted/boost/boost/optional/optional.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional/optional_fwd.hpp (renamed from contrib/restricted/boost/boost/optional/optional_fwd.hpp)0
-rw-r--r--contrib/restricted/boost/optional/include/boost/optional/optional_io.hpp (renamed from contrib/restricted/boost/boost/optional/optional_io.hpp)0
21 files changed, 45 insertions, 98 deletions
diff --git a/CMakeLists.darwin.txt b/CMakeLists.darwin.txt
index ca265b4864..60e3fad767 100644
--- a/CMakeLists.darwin.txt
+++ b/CMakeLists.darwin.txt
@@ -381,6 +381,7 @@ add_subdirectory(contrib/restricted/boost/tuple)
add_subdirectory(contrib/restricted/boost/io)
add_subdirectory(contrib/restricted/boost/logic)
add_subdirectory(contrib/restricted/boost/mp11)
+add_subdirectory(contrib/restricted/boost/optional)
add_subdirectory(contrib/restricted/boost/polygon)
add_subdirectory(contrib/restricted/boost/qvm)
add_subdirectory(contrib/restricted/boost/rational)
diff --git a/CMakeLists.linux.txt b/CMakeLists.linux.txt
index 678f27d07c..2d4c244d5e 100644
--- a/CMakeLists.linux.txt
+++ b/CMakeLists.linux.txt
@@ -384,6 +384,7 @@ add_subdirectory(contrib/restricted/boost/tuple)
add_subdirectory(contrib/restricted/boost/io)
add_subdirectory(contrib/restricted/boost/logic)
add_subdirectory(contrib/restricted/boost/mp11)
+add_subdirectory(contrib/restricted/boost/optional)
add_subdirectory(contrib/restricted/boost/polygon)
add_subdirectory(contrib/restricted/boost/qvm)
add_subdirectory(contrib/restricted/boost/rational)
diff --git a/contrib/restricted/boost/CMakeLists.txt b/contrib/restricted/boost/CMakeLists.txt
index 33d06f98b5..2a000e10ee 100644
--- a/contrib/restricted/boost/CMakeLists.txt
+++ b/contrib/restricted/boost/CMakeLists.txt
@@ -31,6 +31,7 @@ target_link_libraries(contrib-restricted-boost INTERFACE
restricted-boost-move
restricted-boost-mp11
restricted-boost-mpl
+ restricted-boost-optional
restricted-boost-polygon
restricted-boost-predef
restricted-boost-preprocessor
diff --git a/contrib/restricted/boost/boost/optional/detail/experimental_traits.hpp b/contrib/restricted/boost/boost/optional/detail/experimental_traits.hpp
deleted file mode 100644
index 6eded5886e..0000000000
--- a/contrib/restricted/boost/boost/optional/detail/experimental_traits.hpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (C) 2017 Andrzej Krzemienski.
-//
-// Use, modification, and distribution is subject to 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/optional for documentation.
-//
-// You are welcome to contact the author at:
-// akrzemi1@gmail.com
-
-#ifndef BOOST_OPTIONAL_DETAIL_EXPERIMENTAL_TRAITS_04NOV2017_HPP
-#define BOOST_OPTIONAL_DETAIL_EXPERIMENTAL_TRAITS_04NOV2017_HPP
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/type_traits.hpp>
-
-namespace boost { namespace optional_detail {
-
-// The condition to use POD implementation
-
-#ifdef BOOST_OPTIONAL_CONFIG_NO_POD_SPEC
-# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
-#elif defined BOOST_OPTIONAL_CONFIG_NO_SPEC_FOR_TRIVIAL_TYPES
-# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
-#elif !defined BOOST_HAS_TRIVIAL_CONSTRUCTOR
-# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
-#elif !defined BOOST_HAS_TRIVIAL_MOVE_ASSIGN
-# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
-#elif !defined BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR
-# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
-#elif !defined BOOST_HAS_TRIVIAL_COPY
-# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
-#elif !defined BOOST_HAS_TRIVIAL_ASSIGN
-# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
-#elif !defined BOOST_HAS_TRIVIAL_DESTRUCTOR
-# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
-#elif BOOST_WORKAROUND(BOOST_GCC, < 50000)
-# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
-#endif
-
-#if __cplusplus >= 201103L
-# if BOOST_WORKAROUND(BOOST_GCC, >= 50000)
-# define BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
-# elif (defined BOOST_CLANG)
-# define BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
-# endif
-#endif
-
-
-#ifndef BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
-# define BOOST_OPTIONAL_DETAIL_HAS_TRIVIAL_CTOR(T) BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
-#else
-# define BOOST_OPTIONAL_DETAIL_HAS_TRIVIAL_CTOR(T) std::is_trivially_default_constructible<T>::value
-#endif
-
-
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
-template <typename T>
-struct is_type_trivially_copyable
- : boost::conditional<(boost::has_trivial_copy_constructor<T>::value &&
- boost::has_trivial_move_constructor<T>::value &&
- boost::has_trivial_destructor<T>::value &&
- boost::has_trivial_move_assign<T>::value &&
- boost::has_trivial_assign<T>::value),
- boost::true_type, boost::false_type>::type
-{};
-#else
-template <typename T>
-struct is_type_trivially_copyable
-: boost::conditional<(boost::is_scalar<T>::value && !boost::is_const<T>::value && !boost::is_volatile<T>::value),
- boost::true_type, boost::false_type>::type
-{};
-#endif
-
-
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
-template <typename T>
-struct optional_uses_direct_storage_for_
- : boost::conditional< (is_type_trivially_copyable<T>::value && BOOST_OPTIONAL_DETAIL_HAS_TRIVIAL_CTOR(T)) ||
- (boost::is_scalar<T>::value && !boost::is_const<T>::value && !boost::is_volatile<T>::value)
- , boost::true_type, boost::false_type>::type
-{};
-#else
-template <typename T>
-struct optional_uses_direct_storage_for_
- : boost::conditional<(boost::is_scalar<T>::value && !boost::is_const<T>::value && !boost::is_volatile<T>::value)
- , boost::true_type, boost::false_type>::type
-{};
-#endif
-
-
-}} // boost::optional_detail
-
-#endif
diff --git a/contrib/restricted/boost/optional/CMakeLists.txt b/contrib/restricted/boost/optional/CMakeLists.txt
new file mode 100644
index 0000000000..8d4a6e6bf6
--- /dev/null
+++ b/contrib/restricted/boost/optional/CMakeLists.txt
@@ -0,0 +1,27 @@
+
+# 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-optional INTERFACE)
+target_include_directories(restricted-boost-optional INTERFACE
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/optional/include
+)
+target_link_libraries(restricted-boost-optional INTERFACE
+ contrib-libs-cxxsupp
+ yutil
+ restricted-boost-assert
+ restricted-boost-config
+ restricted-boost-core
+ restricted-boost-detail
+ restricted-boost-move
+ restricted-boost-mpl
+ restricted-boost-static_assert
+ restricted-boost-throw_exception
+ restricted-boost-type_traits
+ restricted-boost-utility
+)
diff --git a/contrib/restricted/boost/optional/README.md b/contrib/restricted/boost/optional/README.md
new file mode 100644
index 0000000000..4f73388d1c
--- /dev/null
+++ b/contrib/restricted/boost/optional/README.md
@@ -0,0 +1,15 @@
+optional
+========
+
+A library for representing optional (nullable) objects in C++.
+
+```cpp
+optional<int> readInt(); // this function may return either an int or a not-an-int
+
+if (optional<int> oi = readInt()) // did I get a real int
+ cout << "my int is: " << *oi; // use my int
+else
+ cout << "I have no int";
+```
+
+For more information refer to the documentation provided with this library.
diff --git a/contrib/restricted/boost/boost/none.hpp b/contrib/restricted/boost/optional/include/boost/none.hpp
index a37c45c514..a37c45c514 100644
--- a/contrib/restricted/boost/boost/none.hpp
+++ b/contrib/restricted/boost/optional/include/boost/none.hpp
diff --git a/contrib/restricted/boost/boost/none_t.hpp b/contrib/restricted/boost/optional/include/boost/none_t.hpp
index 008f369d1c..008f369d1c 100644
--- a/contrib/restricted/boost/boost/none_t.hpp
+++ b/contrib/restricted/boost/optional/include/boost/none_t.hpp
diff --git a/contrib/restricted/boost/boost/optional.hpp b/contrib/restricted/boost/optional/include/boost/optional.hpp
index 40cf12e656..40cf12e656 100644
--- a/contrib/restricted/boost/boost/optional.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional.hpp
diff --git a/contrib/restricted/boost/boost/optional/bad_optional_access.hpp b/contrib/restricted/boost/optional/include/boost/optional/bad_optional_access.hpp
index cabf43fbac..cabf43fbac 100644
--- a/contrib/restricted/boost/boost/optional/bad_optional_access.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional/bad_optional_access.hpp
diff --git a/contrib/restricted/boost/boost/optional/detail/old_optional_implementation.hpp b/contrib/restricted/boost/optional/include/boost/optional/detail/old_optional_implementation.hpp
index 62c31eeceb..62c31eeceb 100644
--- a/contrib/restricted/boost/boost/optional/detail/old_optional_implementation.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional/detail/old_optional_implementation.hpp
diff --git a/contrib/restricted/boost/boost/optional/detail/optional_aligned_storage.hpp b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_aligned_storage.hpp
index 2937349f52..2937349f52 100644
--- a/contrib/restricted/boost/boost/optional/detail/optional_aligned_storage.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_aligned_storage.hpp
diff --git a/contrib/restricted/boost/boost/optional/detail/optional_config.hpp b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_config.hpp
index bb7e12f9fc..bb7e12f9fc 100644
--- a/contrib/restricted/boost/boost/optional/detail/optional_config.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_config.hpp
diff --git a/contrib/restricted/boost/boost/optional/detail/optional_factory_support.hpp b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_factory_support.hpp
index efff92a503..efff92a503 100644
--- a/contrib/restricted/boost/boost/optional/detail/optional_factory_support.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_factory_support.hpp
diff --git a/contrib/restricted/boost/boost/optional/detail/optional_reference_spec.hpp b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_reference_spec.hpp
index 012e91a66c..012e91a66c 100644
--- a/contrib/restricted/boost/boost/optional/detail/optional_reference_spec.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_reference_spec.hpp
diff --git a/contrib/restricted/boost/boost/optional/detail/optional_relops.hpp b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_relops.hpp
index 2c17f2b727..2c17f2b727 100644
--- a/contrib/restricted/boost/boost/optional/detail/optional_relops.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_relops.hpp
diff --git a/contrib/restricted/boost/boost/optional/detail/optional_swap.hpp b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_swap.hpp
index 2a7059e701..2a7059e701 100644
--- a/contrib/restricted/boost/boost/optional/detail/optional_swap.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_swap.hpp
diff --git a/contrib/restricted/boost/boost/optional/detail/optional_trivially_copyable_base.hpp b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_trivially_copyable_base.hpp
index 91328ac4e7..91328ac4e7 100644
--- a/contrib/restricted/boost/boost/optional/detail/optional_trivially_copyable_base.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional/detail/optional_trivially_copyable_base.hpp
diff --git a/contrib/restricted/boost/boost/optional/optional.hpp b/contrib/restricted/boost/optional/include/boost/optional/optional.hpp
index 74ef49c549..74ef49c549 100644
--- a/contrib/restricted/boost/boost/optional/optional.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional/optional.hpp
diff --git a/contrib/restricted/boost/boost/optional/optional_fwd.hpp b/contrib/restricted/boost/optional/include/boost/optional/optional_fwd.hpp
index faee253e55..faee253e55 100644
--- a/contrib/restricted/boost/boost/optional/optional_fwd.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional/optional_fwd.hpp
diff --git a/contrib/restricted/boost/boost/optional/optional_io.hpp b/contrib/restricted/boost/optional/include/boost/optional/optional_io.hpp
index ce81b68f8e..ce81b68f8e 100644
--- a/contrib/restricted/boost/boost/optional/optional_io.hpp
+++ b/contrib/restricted/boost/optional/include/boost/optional/optional_io.hpp