summaryrefslogtreecommitdiff
path: root/boost/phoenix/core/value.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/phoenix/core/value.hpp')
-rw-r--r--boost/phoenix/core/value.hpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/boost/phoenix/core/value.hpp b/boost/phoenix/core/value.hpp
index bb381e9..f0ca677 100644
--- a/boost/phoenix/core/value.hpp
+++ b/boost/phoenix/core/value.hpp
@@ -12,6 +12,7 @@
#include <boost/phoenix/core/actor.hpp>
#include <boost/phoenix/core/as_actor.hpp>
#include <boost/phoenix/core/terminal.hpp>
+#include <boost/phoenix/core/is_value.hpp>
#include <boost/utility/result_of.hpp>
namespace boost { namespace phoenix
@@ -51,7 +52,18 @@ namespace boost { namespace phoenix
return expression::value<T>::make(t);
}
+ // Identifies this Expr as a value.
+ // I think this is wrong. It is identifying all actors as values.
+ // Yes, it is giving false positives and needs a rethink.
+ // And this gives no positives.
+ //template <typename T>
+ //struct is_value<expression::value<T> >
+ // : mpl::true_
+ //{};
+
// Call out actor for special handling
+ // Is this correct? It applies to any actor.
+ // In which case why is it here?
template<typename Expr>
struct is_custom_terminal<actor<Expr> >
: mpl::true_
@@ -77,7 +89,10 @@ namespace boost { namespace phoenix
typename result<custom_terminal(actor<Expr> const &, Context &)>::type
operator()(actor<Expr> const & expr, Context & ctx) const
{
- return boost::phoenix::eval(expr, ctx);
+ typedef typename result<custom_terminal(actor<Expr> const &, Context &)>::type result_type;
+ result_type r = boost::phoenix::eval(expr, ctx);
+ // std::cout << "Evaluating val() = " << r << std::endl;
+ return r;
}
};