diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2022-08-15 13:03:30 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2022-08-15 13:03:30 +0300 |
commit | d1cd2a0b2e3dbe2a42d87f5a5f54ffc8cae3130d (patch) | |
tree | ce5fbb0c8a248d6a8fb7302dbe241b03ba2613be /contrib/restricted/boost/proto/include | |
parent | fe65278d7319b7404c7b4ca0f34f829d32f7c79b (diff) | |
download | ydb-d1cd2a0b2e3dbe2a42d87f5a5f54ffc8cae3130d.tar.gz |
Update contrib/restricted/boost/proto to 1.80.0
Diffstat (limited to 'contrib/restricted/boost/proto/include')
4 files changed, 58 insertions, 5 deletions
diff --git a/contrib/restricted/boost/proto/include/boost/proto/debug.hpp b/contrib/restricted/boost/proto/include/boost/proto/debug.hpp index 59b3dd740e..5306a09073 100644 --- a/contrib/restricted/boost/proto/include/boost/proto/debug.hpp +++ b/contrib/restricted/boost/proto/include/boost/proto/debug.hpp @@ -11,14 +11,14 @@ #include <iostream> #include <boost/preprocessor/stringize.hpp> -#include <boost/ref.hpp> +#include <boost/core/ref.hpp> +#include <boost/core/typeinfo.hpp> #include <boost/mpl/assert.hpp> #include <boost/proto/proto_fwd.hpp> #include <boost/proto/traits.hpp> #include <boost/proto/matches.hpp> #include <boost/proto/fusion.hpp> #include <boost/fusion/algorithm/iteration/for_each.hpp> -#include <boost/detail/sp_typeinfo.hpp> namespace boost { namespace proto { @@ -99,7 +99,7 @@ namespace boost { namespace proto { template<typename T> named_any(T const &) - : name_(BOOST_SP_TYPEID(T).name()) + : name_(BOOST_CORE_TYPEID(T).name()) {} char const *name_; @@ -113,6 +113,23 @@ namespace boost { namespace proto namespace detail { + // copyable functor to pass by value to fusion::foreach + struct display_expr_impl; + struct display_expr_impl_functor + { + display_expr_impl_functor(display_expr_impl const& impl): impl_(impl) + {} + + template<typename Expr> + void operator()(Expr const &expr) const + { + this->impl_(expr); + } + + private: + display_expr_impl const& impl_; + }; + struct display_expr_impl { explicit display_expr_impl(std::ostream &sout, int depth = 0) @@ -151,7 +168,7 @@ namespace boost { namespace proto this->sout_ << (this->first_? "" : ", "); this->sout_ << tag() << "(\n"; display_expr_impl display(this->sout_, this->depth_ + 4); - fusion::for_each(expr, display); + fusion::for_each(expr, display_expr_impl_functor(display)); this->sout_.width(this->depth_); this->sout_ << "" << ")\n"; this->first_ = false; diff --git a/contrib/restricted/boost/proto/include/boost/proto/extends.hpp b/contrib/restricted/boost/proto/include/boost/proto/extends.hpp index 42704fb6d7..e38f69359c 100644 --- a/contrib/restricted/boost/proto/include/boost/proto/extends.hpp +++ b/contrib/restricted/boost/proto/include/boost/proto/extends.hpp @@ -74,6 +74,8 @@ namespace boost { namespace proto /// #define BOOST_PROTO_DEFINE_FUN_OP_IMPL_(Z, N, DATA, Const) \ BOOST_PP_IF(N, BOOST_PROTO_TEMPLATE_YES_, BOOST_PROTO_TEMPLATE_NO_)(Z, N) \ + BOOST_PROTO_PUSH_WARNINGS \ + BOOST_PROTO_DISABLE_MSVC_C4180 \ BOOST_PROTO_DISABLE_MSVC_C4714 BOOST_FORCEINLINE \ typename BOOST_PROTO_RESULT_OF< \ proto_generator( \ @@ -98,12 +100,15 @@ namespace boost { namespace proto ) \ ); \ } \ + BOOST_PROTO_POP_WARNINGS \ /**/ /// INTERNAL ONLY /// #define BOOST_PROTO_DEFINE_FUN_OP_VARIADIC_IMPL_(Const) \ template<typename... A> \ + BOOST_PROTO_PUSH_WARNINGS \ + BOOST_PROTO_DISABLE_MSVC_C4180 \ BOOST_PROTO_DISABLE_MSVC_C4714 BOOST_FORCEINLINE \ typename BOOST_PROTO_RESULT_OF< \ proto_generator( \ @@ -128,6 +133,7 @@ namespace boost { namespace proto ) \ ); \ } \ + BOOST_PROTO_POP_WARNINGS \ /**/ /// INTERNAL ONLY @@ -175,6 +181,8 @@ namespace boost { namespace proto typedef boost::proto::tag::proto_expr<proto_tag, proto_domain> fusion_tag; \ BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, BOOST_PROTO_EXTENDS_CHILD, ~) \ \ + BOOST_PROTO_PUSH_WARNINGS \ + \ BOOST_PROTO_DISABLE_MSVC_C4714 BOOST_FORCEINLINE \ static proto_derived_expr const make(Expr const &e) \ { \ @@ -199,6 +207,8 @@ namespace boost { namespace proto { \ return boost::addressof(this->proto_base().child0); \ } \ + \ + BOOST_PROTO_POP_WARNINGS \ /**/ #define BOOST_PROTO_BASIC_EXTENDS(Expr, Derived, Domain) \ @@ -207,6 +217,7 @@ namespace boost { namespace proto /**< INTERNAL ONLY */ #define BOOST_PROTO_EXTENDS_COPY_ASSIGN_IMPL_(This, Const, Typename) \ + BOOST_PROTO_PUSH_WARNINGS \ BOOST_PROTO_DISABLE_MSVC_C4522 \ BOOST_PROTO_DISABLE_MSVC_C4714 BOOST_FORCEINLINE \ Typename() BOOST_PROTO_RESULT_OF< \ @@ -239,6 +250,7 @@ namespace boost { namespace proto }; \ return Typename() This::proto_generator()(that); \ } \ + BOOST_PROTO_POP_WARNINGS \ /**/ // MSVC 8.0 and higher seem to need copy-assignment operator to be overloaded on *both* @@ -258,6 +270,8 @@ namespace boost { namespace proto /// #define BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(ThisConst, ThatConst) \ template<typename A> \ + BOOST_PROTO_PUSH_WARNINGS \ + BOOST_PROTO_DISABLE_MSVC_C4180 \ BOOST_PROTO_DISABLE_MSVC_C4714 BOOST_FORCEINLINE \ typename BOOST_PROTO_RESULT_OF< \ proto_generator( \ @@ -289,6 +303,7 @@ namespace boost { namespace proto }; \ return proto_generator()(that); \ } \ + BOOST_PROTO_POP_WARNINGS \ /**/ #define BOOST_PROTO_EXTENDS_ASSIGN_CONST_() \ @@ -325,6 +340,8 @@ namespace boost { namespace proto /// #define BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(ThisConst, ThatConst) \ template<typename A> \ + BOOST_PROTO_PUSH_WARNINGS \ + BOOST_PROTO_DISABLE_MSVC_C4180 \ BOOST_PROTO_DISABLE_MSVC_C4714 BOOST_FORCEINLINE \ typename BOOST_PROTO_RESULT_OF< \ proto_generator( \ @@ -356,6 +373,7 @@ namespace boost { namespace proto }; \ return proto_generator()(that); \ } \ + BOOST_PROTO_POP_WARNINGS \ /**/ #define BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST() \ diff --git a/contrib/restricted/boost/proto/include/boost/proto/operators.hpp b/contrib/restricted/boost/proto/include/boost/proto/operators.hpp index 7d4195ce1e..1ba36666d2 100644 --- a/contrib/restricted/boost/proto/include/boost/proto/operators.hpp +++ b/contrib/restricted/boost/proto/include/boost/proto/operators.hpp @@ -104,6 +104,8 @@ namespace boost { namespace proto #ifdef BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_PROTO_DEFINE_UNARY_OPERATOR(OP, TAG, TRAIT, DOMAIN, POST) \ + BOOST_PROTO_PUSH_WARNINGS \ + \ template<typename Arg> \ BOOST_PROTO_DISABLE_MSVC_C4714 BOOST_FORCEINLINE \ typename boost::proto::detail::enable_unary< \ @@ -131,9 +133,13 @@ namespace boost { namespace proto { \ return boost::proto::detail::make_expr_<TAG, DOMAIN, Arg const &>()(arg); \ } \ + \ + BOOST_PROTO_POP_WARNINGS \ /**/ #define BOOST_PROTO_DEFINE_BINARY_OPERATOR(OP, TAG, TRAIT, DOMAIN) \ + BOOST_PROTO_PUSH_WARNINGS \ + \ template<typename Left, typename Right> \ BOOST_PROTO_DISABLE_MSVC_C4714 BOOST_FORCEINLINE \ typename boost::proto::detail::enable_binary< \ @@ -193,12 +199,15 @@ namespace boost { namespace proto { \ return boost::proto::detail::make_expr_<TAG, DOMAIN, Left const &, Right const &>()(left, right);\ } \ + \ + BOOST_PROTO_POP_WARNINGS \ /**/ #else #define BOOST_PROTO_DEFINE_UNARY_OPERATOR(OP, TAG, TRAIT, DOMAIN, POST) \ template<typename Arg> \ + BOOST_PROTO_PUSH_WARNINGS \ BOOST_PROTO_DISABLE_MSVC_C4714 BOOST_FORCEINLINE \ typename boost::proto::detail::enable_unary< \ DOMAIN \ @@ -211,10 +220,12 @@ namespace boost { namespace proto { \ return boost::proto::detail::make_expr_<TAG, DOMAIN, Arg const &>()(arg); \ } \ + BOOST_PROTO_POP_WARNINGS \ /**/ #define BOOST_PROTO_DEFINE_BINARY_OPERATOR(OP, TAG, TRAIT, DOMAIN) \ template<typename Left, typename Right> \ + BOOST_PROTO_PUSH_WARNINGS \ BOOST_PROTO_DISABLE_MSVC_C4714 BOOST_FORCEINLINE \ typename boost::proto::detail::enable_binary< \ DOMAIN \ @@ -228,6 +239,7 @@ namespace boost { namespace proto { \ return boost::proto::detail::make_expr_<TAG, DOMAIN, Left const &, Right const &>()(left, right);\ } \ + BOOST_PROTO_POP_WARNINGS \ /**/ #endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/proto_fwd.hpp b/contrib/restricted/boost/proto/include/boost/proto/proto_fwd.hpp index a1a25987f1..42f62ff382 100644 --- a/contrib/restricted/boost/proto/include/boost/proto/proto_fwd.hpp +++ b/contrib/restricted/boost/proto/include/boost/proto/proto_fwd.hpp @@ -124,9 +124,15 @@ #endif #if defined(_MSC_VER) +# define BOOST_PROTO_PUSH_WARNINGS __pragma(warning(push)) +# define BOOST_PROTO_POP_WARNINGS __pragma(warning(pop)) +# define BOOST_PROTO_DISABLE_MSVC_C4180 __pragma(warning(disable : 4180)) // qualifier applied to function type has no meaning; ignored # define BOOST_PROTO_DISABLE_MSVC_C4522 __pragma(warning(disable : 4522)) // 'class' : multiple assignment operators specified # define BOOST_PROTO_DISABLE_MSVC_C4714 __pragma(warning(disable : 4714)) // function 'xxx' marked as __forceinline not inlined #else +# define BOOST_PROTO_PUSH_WARNINGS +# define BOOST_PROTO_POP_WARNINGS +# define BOOST_PROTO_DISABLE_MSVC_C4180 # define BOOST_PROTO_DISABLE_MSVC_C4522 # define BOOST_PROTO_DISABLE_MSVC_C4714 #endif @@ -683,7 +689,7 @@ namespace boost { namespace proto typedef functional::make_pair _make_pair; typedef functional::first _first; typedef functional::second _second; - typedef functional::pop_front _at; + typedef functional::at _at; typedef functional::pop_front _pop_front; typedef functional::push_front _push_front; typedef functional::pop_back _pop_back; |