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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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> >
|
||||
|
||||
Reference in New Issue
Block a user