2
0
mirror of https://github.com/boostorg/phoenix.git synced 2026-02-18 02:12:09 +00:00

core/is_value and value. Identify val() at run time

This commit is contained in:
John Fletcher
2015-02-04 10:59:15 +00:00
parent 6f55a5ae6e
commit 60a6fbbee3
2 changed files with 8 additions and 1 deletions

View File

@@ -45,12 +45,13 @@ namespace boost { namespace phoenix
: is_value<T>
{};
// This does not seem to work.
// There is an alternative in value.hpp which does work.
template <typename T>
struct is_value< expression::value<T> >
: mpl::true_
{};
template <typename T>
bool is_val(T const &t)
{

View File

@@ -52,6 +52,12 @@ namespace boost { namespace phoenix
return expression::value<T>::make(t);
}
// Identifies this Expr as a value.
template <typename Expr>
struct is_value<actor<Expr> >
: mpl::true_
{};
// Call out actor for special handling
template<typename Expr>
struct is_custom_terminal<actor<Expr> >