]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/proto/debug.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / proto / debug.hpp
index f732bc2a99062857f69b414d1f39c74f5d3b1191..7d3e42fce004eef86e520443eca556c38a1463e3 100644 (file)
 
 #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
 {
@@ -100,7 +100,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_;
@@ -114,6 +114,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)
@@ -152,7 +169,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;