diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2022-08-04 16:22:56 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2022-08-04 16:22:56 +0300 |
commit | bf961bc388920c0f3ccdeb8e34b1b60254ce445b (patch) | |
tree | 7fb544aed630bd4ebcd0e00da4d1337739096b6f | |
parent | 49006889f73404f165d461ffe46a58107df3c5e7 (diff) | |
download | ydb-bf961bc388920c0f3ccdeb8e34b1b60254ce445b.tar.gz |
Update contrib/restricted/boost/static_assert to 1.79.0
-rw-r--r-- | contrib/restricted/boost/static_assert/README.md | 36 | ||||
-rw-r--r-- | contrib/restricted/boost/static_assert/include/boost/static_assert.hpp | 9 |
2 files changed, 41 insertions, 4 deletions
diff --git a/contrib/restricted/boost/static_assert/README.md b/contrib/restricted/boost/static_assert/README.md new file mode 100644 index 0000000000..c2900106d4 --- /dev/null +++ b/contrib/restricted/boost/static_assert/README.md @@ -0,0 +1,36 @@ +Boost StaticAssert Library +============================ + +The Boost StaticAssert library provides static assertions for C++, this library is the ancestor to C++ native static_assert's and +can be used on older compilers which don't have that feature. + +The full documentation is available on [boost.org](http://www.boost.org/doc/libs/release/libs/static_assert). + +## Support, bugs and feature requests ## + +Bugs and feature requests can be reported through the [Gitub issue tracker](https://github.com/boostorg/static_assert/issues) +(see [open issues](https://github.com/boostorg/static_assert/issues) and +[closed issues](https://github.com/boostorg/static_assert/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed)). + +You can submit your changes through a [pull request](https://github.com/boostorg/static_assert/pulls). + +There is no mailing-list specific to Boost StaticAssert, although you can use the general-purpose Boost [mailing-list](http://lists.boost.org/mailman/listinfo.cgi/boost-users) using the tag [static_assert]. + + +## Development ## + +Clone the whole boost project, which includes the individual Boost projects as submodules ([see boost+git doc](https://github.com/boostorg/boost/wiki/Getting-Started)): + + git clone https://github.com/boostorg/boost + cd boost + git submodule update --init + +The Boost StaticAssert Library is located in `libs/static_assert/`. + +### Running tests ### +First, make sure you are in `libs/static_assert/test`. +You can either run all the tests listed in `Jamfile.v2` or run a single test: + + ../../../b2 <- run all tests + ../../../b2 static_assert_test <- single test + diff --git a/contrib/restricted/boost/static_assert/include/boost/static_assert.hpp b/contrib/restricted/boost/static_assert/include/boost/static_assert.hpp index 07d461d492..d94ca8070c 100644 --- a/contrib/restricted/boost/static_assert/include/boost/static_assert.hpp +++ b/contrib/restricted/boost/static_assert/include/boost/static_assert.hpp @@ -16,6 +16,7 @@ #include <boost/config.hpp> #include <boost/detail/workaround.hpp> +#include <cstddef> //for std::size_t #if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) // @@ -36,7 +37,7 @@ # define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) #endif -#ifdef __BORLANDC__ +#ifdef BOOST_BORLANDC // // workaround for buggy integral-constant expression support: #define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS @@ -53,9 +54,9 @@ // #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))) # ifndef BOOST_NO_CXX11_VARIADIC_MACROS -# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) ((__VA_ARGS__) == 0 ? false : true) +# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) ((__VA_ARGS__) != 0) # else -# define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) == 0 ? false : true) +# define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) != 0) # endif #else # ifndef BOOST_NO_CXX11_VARIADIC_MACROS @@ -81,7 +82,7 @@ template <bool x> struct STATIC_ASSERTION_FAILURE; template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; }; // HP aCC cannot deal with missing names for template value parameters -template<int x> struct static_assert_test{}; +template<std::size_t x> struct static_assert_test{}; } |