diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2022-08-11 15:21:12 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2022-08-11 15:21:12 +0300 |
commit | 9de0b0f56f79abfaf40b017ffebb5017476415a6 (patch) | |
tree | 0de3a1565ebed98d797cc4f90c944c3fb4d05f9e /contrib/restricted/boost | |
parent | 323a9b8863c7cfc56241606f8f899a2cc4b2196d (diff) | |
download | ydb-9de0b0f56f79abfaf40b017ffebb5017476415a6.tar.gz |
Update contrib/restricted/boost/any to 1.80.0
Diffstat (limited to 'contrib/restricted/boost')
-rw-r--r-- | contrib/restricted/boost/any/README.md | 14 | ||||
-rw-r--r-- | contrib/restricted/boost/any/include/boost/any.hpp | 83 | ||||
-rw-r--r-- | contrib/restricted/boost/any/include/boost/any/bad_any_cast.hpp | 43 | ||||
-rw-r--r-- | contrib/restricted/boost/any/include/boost/any/fwd.hpp | 40 | ||||
-rw-r--r-- | contrib/restricted/boost/interval/README.md | 6 |
5 files changed, 138 insertions, 48 deletions
diff --git a/contrib/restricted/boost/any/README.md b/contrib/restricted/boost/any/README.md index 2da4bdcd39..63eedd5dcd 100644 --- a/contrib/restricted/boost/any/README.md +++ b/contrib/restricted/boost/any/README.md @@ -1,16 +1,16 @@ -# [Boost.Any](http://boost.org/libs/any) -Boost.Any is a part of the [Boost C++ Libraries](http://github.com/boostorg). It is a safe, generic container for single values of different value types. +# [Boost.Any](https://boost.org/libs/any) +Boost.Any is a part of the [Boost C++ Libraries](https://github.com/boostorg). It is a safe, generic container for single values of different value types. -### Test results +### Test results @ | Build | Tests coverage | More info ----------------|-------------- | -------------- |----------- -Develop branch: | [![Build Status](https://travis-ci.org/apolukhin/any.svg?branch=develop)](https://travis-ci.org/apolukhin/any) [![Build status](https://ci.appveyor.com/api/projects/status/dmugl75nfhjnx7ot/branch/develop?svg=true)](https://ci.appveyor.com/project/apolukhin/any/branch/develop) | [![Coverage Status](https://coveralls.io/repos/apolukhin/any/badge.png?branch=develop)](https://coveralls.io/r/apolukhin/any?branch=develop) | [details...](http://www.boost.org/development/tests/develop/developer/any.html) -Master branch: | [![Build Status](https://travis-ci.org/apolukhin/any.svg?branch=master)](https://travis-ci.org/apolukhin/any) [![Build status](https://ci.appveyor.com/api/projects/status/dmugl75nfhjnx7ot/branch/master?svg=true)](https://ci.appveyor.com/project/apolukhin/any/branch/master) | [![Coverage Status](https://coveralls.io/repos/apolukhin/any/badge.png?branch=master)](https://coveralls.io/r/apolukhin/any?branch=master) | [details...](http://www.boost.org/development/tests/master/developer/any.html) +Develop branch: | [![Github Actions CI](https://github.com/boostorg/any/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/any/actions/workflows/ci.yml) [![Build status](https://ci.appveyor.com/api/projects/status/dmugl75nfhjnx7ot/branch/develop?svg=true)](https://ci.appveyor.com/project/apolukhin/any/branch/develop) | [![Coverage Status](https://coveralls.io/repos/boostorg/any/badge.png?branch=develop)](https://coveralls.io/r/boostorg/any?branch=develop) | [details...](https://www.boost.org/development/tests/develop/developer/any.html) +Master branch: | [![Github Actions CI](https://github.com/boostorg/any/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/boostorg/any/actions/workflows/ci.yml) [![Build status](https://ci.appveyor.com/api/projects/status/dmugl75nfhjnx7ot/branch/master?svg=true)](https://ci.appveyor.com/project/apolukhin/any/branch/master) | [![Coverage Status](https://coveralls.io/repos/boostorg/any/badge.png?branch=master)](https://coveralls.io/r/boostorg/any?branch=master) | [details...](https://www.boost.org/development/tests/master/developer/any.html) -[Open Issues](https://svn.boost.org/trac/boost/query?status=!closed&component=any) +[Latest developer documentation](https://www.boost.org/doc/libs/develop/doc/html/any.html) ### License -Distributed under the [Boost Software License, Version 1.0](http://boost.org/LICENSE_1_0.txt). +Distributed under the [Boost Software License, Version 1.0](https://boost.org/LICENSE_1_0.txt). diff --git a/contrib/restricted/boost/any/include/boost/any.hpp b/contrib/restricted/boost/any/include/boost/any.hpp index 9f6b313274..9d2e921416 100644 --- a/contrib/restricted/boost/any/include/boost/any.hpp +++ b/contrib/restricted/boost/any/include/boost/any.hpp @@ -3,20 +3,20 @@ #ifndef BOOST_ANY_INCLUDED #define BOOST_ANY_INCLUDED -#if defined(_MSC_VER) +#include <boost/config.hpp> +#ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif // what: variant type boost::any // who: contributed by Kevlin Henney, // with features contributed and bugs found by -// Antony Polukhin, Ed Brey, Mark Rodgers, +// Antony Polukhin, Ed Brey, Mark Rodgers, // Peter Dimov, and James Curran -// when: July 2001, April 2013 - May 2013 - -#include <algorithm> +// when: July 2001, April 2013 - 2020 -#include <boost/config.hpp> +#include <boost/any/bad_any_cast.hpp> +#include <boost/any/fwd.hpp> #include <boost/type_index.hpp> #include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/decay.hpp> @@ -29,8 +29,7 @@ #include <boost/utility/enable_if.hpp> #include <boost/core/addressof.hpp> #include <boost/type_traits/is_same.hpp> -#include <boost/type_traits/is_const.hpp> -#include <boost/mpl/if.hpp> +#include <boost/type_traits/conditional.hpp> namespace boost { @@ -38,7 +37,7 @@ namespace boost { public: // structors - any() BOOST_NOEXCEPT + BOOST_CONSTEXPR any() BOOST_NOEXCEPT : content(0) { } @@ -49,6 +48,10 @@ namespace boost BOOST_DEDUCED_TYPENAME remove_cv<BOOST_DEDUCED_TYPENAME decay<const ValueType>::type>::type >(value)) { + BOOST_STATIC_ASSERT_MSG( + !anys::detail::is_basic_any<ValueType>::value, + "boost::any shall not be constructed from boost::anys::basic_any" + ); } any(const any & other) @@ -71,6 +74,10 @@ namespace boost , typename boost::disable_if<boost::is_const<ValueType> >::type* = 0) // disable if value has type `const ValueType&&` : content(new holder< typename decay<ValueType>::type >(static_cast<ValueType&&>(value))) { + BOOST_STATIC_ASSERT_MSG( + !anys::detail::is_basic_any<typename boost::decay<ValueType>::type>::value, + "boost::any shall not be constructed from boost::anys::basic_any" + ); } #endif @@ -83,7 +90,9 @@ namespace boost any & swap(any & rhs) BOOST_NOEXCEPT { - std::swap(content, rhs.content); + placeholder* tmp = content; + content = rhs.content; + rhs.content = tmp; return *this; } @@ -92,24 +101,28 @@ namespace boost template<typename ValueType> any & operator=(const ValueType & rhs) { + BOOST_STATIC_ASSERT_MSG( + !anys::detail::is_basic_any<ValueType>::value, + "boost::anys::basic_any shall not be assigned into boost::any" + ); any(rhs).swap(*this); return *this; } any & operator=(any rhs) { - any(rhs).swap(*this); + rhs.swap(*this); return *this; } -#else +#else any & operator=(const any& rhs) { any(rhs).swap(*this); return *this; } - // move assignement + // move assignment any & operator=(any&& rhs) BOOST_NOEXCEPT { rhs.swap(*this); @@ -121,6 +134,10 @@ namespace boost template <class ValueType> any & operator=(ValueType&& rhs) { + BOOST_STATIC_ASSERT_MSG( + !anys::detail::is_basic_any<typename boost::decay<ValueType>::type>::value, + "boost::anys::basic_any shall not be assigned into boost::any" + ); any(static_cast<ValueType&&>(rhs)).swap(*this); return *this; } @@ -149,7 +166,7 @@ namespace boost public: // types (public so any_cast can be non-friend) #endif - class placeholder + class BOOST_SYMBOL_VISIBLE placeholder { public: // structors @@ -166,7 +183,11 @@ namespace boost }; template<typename ValueType> - class holder : public placeholder + class holder +#ifndef BOOST_NO_CXX11_FINAL + final +#endif + : public placeholder { public: // structors @@ -183,12 +204,12 @@ namespace boost #endif public: // queries - virtual const boost::typeindex::type_info& type() const BOOST_NOEXCEPT + const boost::typeindex::type_info& type() const BOOST_NOEXCEPT BOOST_OVERRIDE { return boost::typeindex::type_id<ValueType>().type_info(); } - virtual placeholder * clone() const + placeholder * clone() const BOOST_OVERRIDE { return new holder(held); } @@ -220,27 +241,12 @@ namespace boost placeholder * content; }; - + inline void swap(any & lhs, any & rhs) BOOST_NOEXCEPT { lhs.swap(rhs); } - class BOOST_SYMBOL_VISIBLE bad_any_cast : -#ifndef BOOST_NO_RTTI - public std::bad_cast -#else - public std::exception -#endif - { - public: - virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW - { - return "boost::bad_any_cast: " - "failed conversion using boost::any_cast"; - } - }; - template<typename ValueType> ValueType * any_cast(any * operand) BOOST_NOEXCEPT { @@ -267,12 +273,12 @@ namespace boost if(!result) boost::throw_exception(bad_any_cast()); - // Attempt to avoid construction of a temporary object in cases when + // Attempt to avoid construction of a temporary object in cases when // `ValueType` is not a reference. Example: - // `static_cast<std::string>(*result);` + // `static_cast<std::string>(*result);` // which is equal to `std::string(*result);` - typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< - boost::is_reference<ValueType>, + typedef BOOST_DEDUCED_TYPENAME boost::conditional< + boost::is_reference<ValueType>::value, ValueType, BOOST_DEDUCED_TYPENAME boost::add_reference<ValueType>::type >::type ref_type; @@ -301,7 +307,7 @@ namespace boost BOOST_STATIC_ASSERT_MSG( boost::is_rvalue_reference<ValueType&&>::value /*true if ValueType is rvalue or just a value*/ || boost::is_const< typename boost::remove_reference<ValueType>::type >::value, - "boost::any_cast shall not be used for getting nonconst references to temporary objects" + "boost::any_cast shall not be used for getting nonconst references to temporary objects" ); return any_cast<ValueType>(operand); } @@ -329,6 +335,7 @@ namespace boost } // Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved. +// Copyright Antony Polukhin, 2013-2022. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at diff --git a/contrib/restricted/boost/any/include/boost/any/bad_any_cast.hpp b/contrib/restricted/boost/any/include/boost/any/bad_any_cast.hpp new file mode 100644 index 0000000000..bba142da50 --- /dev/null +++ b/contrib/restricted/boost/any/include/boost/any/bad_any_cast.hpp @@ -0,0 +1,43 @@ +// Copyright Antony Polukhin, 2020-2022. +// +// 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/any for Documentation. + +#ifndef BOOST_ANYS_BAD_ANY_CAST_HPP_INCLUDED +#define BOOST_ANYS_BAD_ANY_CAST_HPP_INCLUDED + +#include <boost/config.hpp> +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#ifndef BOOST_NO_RTTI +#include <typeinfo> +#endif + +#include <stdexcept> + +namespace boost { + +class BOOST_SYMBOL_VISIBLE bad_any_cast : +#ifndef BOOST_NO_RTTI + public std::bad_cast +#else + public std::exception +#endif +{ +public: + const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE + { + return "boost::bad_any_cast: " + "failed conversion using boost::any_cast"; + } +}; + +} // namespace boost + + +#endif // #ifndef BOOST_ANYS_BAD_ANY_CAST_HPP_INCLUDED diff --git a/contrib/restricted/boost/any/include/boost/any/fwd.hpp b/contrib/restricted/boost/any/include/boost/any/fwd.hpp new file mode 100644 index 0000000000..6905b26440 --- /dev/null +++ b/contrib/restricted/boost/any/include/boost/any/fwd.hpp @@ -0,0 +1,40 @@ +// Copyright Antony Polukhin, 2021-2022. +// +// 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) + +// Contributed by Ruslan Arutyunyan +#ifndef BOOST_ANY_ANYS_FWD_HPP +#define BOOST_ANY_ANYS_FWD_HPP + +#include <boost/config.hpp> +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + + #include <boost/type_traits/alignment_of.hpp> + +namespace boost { + +class any; + +namespace anys { + +template<std::size_t OptimizeForSize = sizeof(void*), std::size_t OptimizeForAlignment = boost::alignment_of<void*>::value> +class basic_any; + +namespace detail { + template <class T> + struct is_basic_any: public false_type {}; + + + template<std::size_t OptimizeForSize, std::size_t OptimizeForAlignment> + struct is_basic_any<boost::anys::basic_any<OptimizeForSize, OptimizeForAlignment> > : public true_type {}; +} // namespace detail + +} // namespace anys + +} // namespace boost + +#endif // #ifndef BOOST_ANY_ANYS_FWD_HPP diff --git a/contrib/restricted/boost/interval/README.md b/contrib/restricted/boost/interval/README.md index d211dfb32d..f193e4eadf 100644 --- a/contrib/restricted/boost/interval/README.md +++ b/contrib/restricted/boost/interval/README.md @@ -11,10 +11,10 @@ Distributed under the [Boost Software License, Version 1.0](http://www.boost.org ### Build Status -Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests | +Branch | GHA CI | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests | :-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- | -[`master`](https://github.com/boostorg/interval/tree/master) | [![Build Status](https://travis-ci.org/boostorg/interval.svg?branch=master)](https://travis-ci.org/boostorg/interval) | [![Build status](https://ci.appveyor.com/api/projects/status/wx6gsonby36or5m2/branch/master?svg=true)](https://ci.appveyor.com/project/jeking3/interval-o0u28/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/17151/badge.svg)](https://scan.coverity.com/projects/boostorg-interval) | [![codecov](https://codecov.io/gh/boostorg/interval/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/interval/branch/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/interval.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/interval.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/interval.html) -[`develop`](https://github.com/boostorg/interval/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/interval.svg?branch=develop)](https://travis-ci.org/boostorg/interval) | [![Build status](https://ci.appveyor.com/api/projects/status/wx6gsonby36or5m2/branch/develop?svg=true)](https://ci.appveyor.com/project/jeking3/interval-o0u28/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/17151/badge.svg)](https://scan.coverity.com/projects/boostorg-interval) | [![codecov](https://codecov.io/gh/boostorg/interval/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/interval/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/interval.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/interval.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/interval.html) +[`master`](https://github.com/boostorg/interval/tree/master) | [![Build Status](https://github.com/boostorg/interval/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/boostorg/interval/actions?query=branch:master) | [![Build status](https://ci.appveyor.com/api/projects/status/wx6gsonby36or5m2/branch/master?svg=true)](https://ci.appveyor.com/project/jeking3/interval-o0u28/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/17151/badge.svg)](https://scan.coverity.com/projects/boostorg-interval) | [![codecov](https://codecov.io/gh/boostorg/interval/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/interval/branch/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/interval.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](https://www.boost.org/doc/libs/master/libs/numeric/interval/doc/interval.htm) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/interval.html) +[`develop`](https://github.com/boostorg/interval/tree/develop) | [![Build Status](https://github.com/boostorg/interval/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/interval/actions?query=branch:develop) | [![Build status](https://ci.appveyor.com/api/projects/status/wx6gsonby36or5m2/branch/develop?svg=true)](https://ci.appveyor.com/project/jeking3/interval-o0u28/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/17151/badge.svg)](https://scan.coverity.com/projects/boostorg-interval) | [![codecov](https://codecov.io/gh/boostorg/interval/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/interval/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/interval.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](https://www.boost.org/doc/libs/develop/libs/numeric/interval/doc/interval.htm) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/interval.html) ### Directories |