From 60a6fbbee332277c5b60e2dd45dfac9c64328de3 Mon Sep 17 00:00:00 2001 From: John Fletcher Date: Wed, 4 Feb 2015 10:59:15 +0000 Subject: [PATCH] core/is_value and value. Identify val() at run time --- include/boost/phoenix/core/is_value.hpp | 3 ++- include/boost/phoenix/core/value.hpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/boost/phoenix/core/is_value.hpp b/include/boost/phoenix/core/is_value.hpp index 4bd6a12..501d7e0 100644 --- a/include/boost/phoenix/core/is_value.hpp +++ b/include/boost/phoenix/core/is_value.hpp @@ -45,12 +45,13 @@ namespace boost { namespace phoenix : is_value {}; + // This does not seem to work. + // There is an alternative in value.hpp which does work. template struct is_value< expression::value > : mpl::true_ {}; - template bool is_val(T const &t) { diff --git a/include/boost/phoenix/core/value.hpp b/include/boost/phoenix/core/value.hpp index 30e1344..d2e8ce9 100644 --- a/include/boost/phoenix/core/value.hpp +++ b/include/boost/phoenix/core/value.hpp @@ -52,6 +52,12 @@ namespace boost { namespace phoenix return expression::value::make(t); } + // Identifies this Expr as a value. + template + struct is_value > + : mpl::true_ + {}; + // Call out actor for special handling template struct is_custom_terminal >