diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2022-08-15 12:54:23 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2022-08-15 12:54:23 +0300 |
commit | fe65278d7319b7404c7b4ca0f34f829d32f7c79b (patch) | |
tree | 376f6d2e76b19387bdfe000ebb5b98a98fc20cad | |
parent | 6dc81cf3b001f476cba7b0c14212414de8919283 (diff) | |
download | ydb-fe65278d7319b7404c7b4ca0f34f829d32f7c79b.tar.gz |
Update contrib/restricted/boost/foreach to 1.80.0
-rw-r--r-- | contrib/restricted/boost/foreach/include/boost/foreach.hpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/contrib/restricted/boost/foreach/include/boost/foreach.hpp b/contrib/restricted/boost/foreach/include/boost/foreach.hpp index eb3a50b653..33b6921d28 100644 --- a/contrib/restricted/boost/foreach/include/boost/foreach.hpp +++ b/contrib/restricted/boost/foreach/include/boost/foreach.hpp @@ -30,6 +30,13 @@ #include <boost/config.hpp> #include <boost/detail/workaround.hpp> +// Define a compiler generic null pointer value +#if defined(BOOST_NO_NULLPTR) +#define BOOST_FOREACH_NULL 0 +#else +#define BOOST_FOREACH_NULL nullptr +#endif + // Some compilers let us detect even const-qualified rvalues at compile-time #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) \ || defined(BOOST_MSVC) && !defined(_PREFAST_) \ @@ -42,7 +49,7 @@ // Some compilers allow temporaries to be bound to non-const references. // These compilers make it impossible to for BOOST_FOREACH to detect // temporaries and avoid reevaluation of the collection expression. -# if BOOST_WORKAROUND(__BORLANDC__, < 0x593) \ +# if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x593) \ || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \ || BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) \ || BOOST_WORKAROUND(__DECCXX_VER, <= 60590042) @@ -58,7 +65,7 @@ || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) \ || BOOST_WORKAROUND(__SUNPRO_CC, >= 0x5100) \ - || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x590)) + || BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x590)) # define BOOST_FOREACH_NO_CONST_RVALUE_DETECTION # else # define BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION @@ -429,7 +436,7 @@ inline T *&to_ptr(T const &) } // Borland needs a little extra help with arrays -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) template<typename T,std::size_t N> inline T (*&to_ptr(T (&)[N]))[N] { @@ -909,7 +916,7 @@ rderef(auto_any_t cur, type2type<T, C> *) // A sneaky way to get the type of the collection without evaluating the expression #define BOOST_FOREACH_TYPEOF(COL) \ - (true ? 0 : boost::foreach_detail_::encode_type(COL, boost::foreach_detail_::is_const_(COL))) + (true ? BOOST_FOREACH_NULL : boost::foreach_detail_::encode_type(COL, boost::foreach_detail_::is_const_(COL))) // returns true_* if the type is noncopyable #define BOOST_FOREACH_IS_NONCOPYABLE(COL) \ @@ -939,7 +946,7 @@ rderef(auto_any_t cur, type2type<T, C> *) (COL) # define BOOST_FOREACH_SHOULD_COPY(COL) \ - (true ? 0 : boost::foreach_detail_::or_( \ + (true ? BOOST_FOREACH_NULL : boost::foreach_detail_::or_( \ BOOST_FOREACH_IS_RVALUE(COL) \ , BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL))) @@ -962,11 +969,11 @@ rderef(auto_any_t cur, type2type<T, C> *) // If the type happens to be a lightweight proxy, always make a copy. # define BOOST_FOREACH_SHOULD_COPY(COL) \ (boost::foreach_detail_::should_copy_impl( \ - true ? 0 : boost::foreach_detail_::or_( \ + true ? BOOST_FOREACH_NULL : boost::foreach_detail_::or_( \ boost::foreach_detail_::is_array_(COL) \ , BOOST_FOREACH_IS_NONCOPYABLE(COL) \ , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(COL))) \ - , true ? 0 : BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL) \ + , true ? BOOST_FOREACH_NULL : BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL) \ , &BOOST_FOREACH_ID(_foreach_is_rvalue))) #elif !defined(BOOST_FOREACH_NO_RVALUE_DETECTION) @@ -985,7 +992,7 @@ rderef(auto_any_t cur, type2type<T, C> *) // Determine whether the collection expression is an lvalue or an rvalue. // NOTE: this gets the answer wrong for const rvalues. # define BOOST_FOREACH_SHOULD_COPY(COL) \ - (true ? 0 : boost::foreach_detail_::or_( \ + (true ? BOOST_FOREACH_NULL : boost::foreach_detail_::or_( \ boost::foreach_detail_::is_rvalue_((COL), 0) \ , BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL))) @@ -1004,7 +1011,7 @@ rderef(auto_any_t cur, type2type<T, C> *) // Can't use rvalues with BOOST_FOREACH (unless they are lightweight proxies) # define BOOST_FOREACH_SHOULD_COPY(COL) \ - (true ? 0 : BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL)) + (true ? BOOST_FOREACH_NULL : BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL)) #endif |