update boost

This commit is contained in:
2023-11-24 12:56:13 -06:00
parent cfc99971af
commit 19d727037a
9260 changed files with 849256 additions and 299957 deletions

View File

@@ -42,8 +42,8 @@ namespace boost { namespace proto
callable_context_wrapper();
typedef private_type_ fun_type(...);
operator fun_type *() const;
private:
callable_context_wrapper &operator =(callable_context_wrapper const &);
BOOST_DELETED_FUNCTION(callable_context_wrapper &operator =(callable_context_wrapper const &))
};
template<typename T>

View File

@@ -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
{
@@ -92,15 +92,14 @@ namespace boost { namespace proto
std::ostream &sout_;
private:
ostream_wrapper &operator =(ostream_wrapper const &);
BOOST_DELETED_FUNCTION(ostream_wrapper &operator =(ostream_wrapper const &))
};
struct named_any
{
template<typename T>
named_any(T const &)
: name_(BOOST_SP_TYPEID(T).name())
: name_(BOOST_CORE_TYPEID(T).name())
{}
char const *name_;
@@ -114,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)
@@ -128,9 +144,9 @@ namespace boost { namespace proto
this->impl(expr, mpl::long_<arity_of<Expr>::value>());
}
BOOST_DELETED_FUNCTION(display_expr_impl(display_expr_impl const &))
BOOST_DELETED_FUNCTION(display_expr_impl &operator =(display_expr_impl const &))
private:
display_expr_impl(display_expr_impl const &);
display_expr_impl &operator =(display_expr_impl const &);
template<typename Expr>
void impl(Expr const &expr, mpl::long_<0>) const
@@ -152,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;

View File

@@ -24,7 +24,6 @@ namespace boost { namespace proto
struct any
{
template<typename T> any(T const &) {}
any operator=(any);
any operator[](any);
#define M0(Z, N, DATA) any operator()(BOOST_PP_ENUM_PARAMS_Z(Z, N, any BOOST_PP_INTERCEPT));
BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, M0, ~)

View File

@@ -111,8 +111,8 @@ namespace boost { namespace proto { namespace detail
return this->value;
}
BOOST_DELETED_FUNCTION(arg &operator =(arg const &))
private:
arg &operator =(arg const &);
type value;
};
@@ -135,8 +135,8 @@ namespace boost { namespace proto { namespace detail
return this->value;
}
BOOST_DELETED_FUNCTION(arg &operator =(arg const &))
private:
arg &operator =(arg const &);
type value;
};

View File

@@ -92,7 +92,7 @@ namespace boost { namespace proto
// Work-around for:
// https://connect.microsoft.com/VisualStudio/feedback/details/765449/codegen-stack-corruption-using-runtime-checks-when-aggregate-initializing-struct
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1700))
#if BOOST_WORKAROUND(BOOST_MSVC, < 1800)
template<typename T, typename Expr, typename C, typename U>
BOOST_FORCEINLINE
Expr make_terminal(T &t, Expr *, proto::term<U C::*> *)
@@ -132,9 +132,21 @@ namespace boost { namespace proto
// actually defined:
#include <boost/proto/detail/basic_expr.hpp>
#if defined(__GNUC__) && __GNUC__ >= 9 || defined(__clang__) && __clang_major__ >= 10
#pragma GCC diagnostic push
// The warning cannot be fixed for aggregates
// Sadly, GCC currently emits the warning at the use location:
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94492
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
// This is where the expr specialization are
// actually defined:
#include <boost/proto/detail/expr.hpp>
#if defined(__GNUC__) && __GNUC__ >= 9 || defined(__clang__) && __clang_major__ >= 10
#pragma GCC diagnostic pop
#endif
}
/// \brief Lets you inherit the interface of an expression

View File

@@ -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() \
@@ -505,11 +523,6 @@ namespace boost { namespace proto
: proto_expr_()
{}
BOOST_FORCEINLINE
extends(extends const &that)
: proto_expr_(that.proto_expr_)
{}
BOOST_FORCEINLINE
extends(Expr const &expr_)
: proto_expr_(expr_)
@@ -536,11 +549,6 @@ namespace boost { namespace proto
: proto_expr_()
{}
BOOST_FORCEINLINE
extends(extends const &that)
: proto_expr_(that.proto_expr_)
{}
BOOST_FORCEINLINE
extends(Expr const &expr_)
: proto_expr_(expr_)

View File

@@ -230,7 +230,7 @@ namespace boost { namespace proto
// Work-around for:
// https://connect.microsoft.com/VisualStudio/feedback/details/765449/codegen-stack-corruption-using-runtime-checks-when-aggregate-initializing-struct
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1700))
#if BOOST_WORKAROUND(BOOST_MSVC, < 1800)
template<typename Class, typename Member>
BOOST_FORCEINLINE
Extends<expr<tag::terminal, proto::term<Member Class::*> > > operator ()(expr<tag::terminal, proto::term<Member Class::*> > const &e) const

View File

@@ -50,6 +50,10 @@ namespace boost { namespace proto
: base_type(terminal_type::make(T()))
{}
#ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
literal(literal const &) = default;
#endif
template<typename U>
literal(U &u)
: base_type(terminal_type::make(u))

View File

@@ -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

View File

@@ -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;