#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
{
{
template<typename T>
named_any(T const &)
- : name_(BOOST_SP_TYPEID(T).name())
+ : name_(BOOST_CORE_TYPEID(T).name())
{}
char const *name_;
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)
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;