/usr/include/boost/phoenix/core
Edit: /usr/include/boost/phoenix/core/is_nullary.hpp (5297B)
/*=============================================================================
Copyright (c) 2005-2010 Joel de Guzman
Copyright (c) 2010 Eric Niebler
Copyright (c) 2010 Thomas Heller
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_PHOENIX_CORE_IS_NULLARY_HPP
#define BOOST_PHOENIX_CORE_IS_NULLARY_HPP
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost { namespace phoenix
{
namespace result_of
{
template
struct is_nullary;
}
struct is_nullary
{
template
struct when
: proto::fold<
proto::_
, mpl::true_()
, mpl::and_<
proto::_state
, proto::call
>()
>
{};
};
template
struct is_nullary::when
{
BOOST_PROTO_TRANSFORM(is_nullary::when)
template
struct impl
{
typedef mpl::false_ result_type;
};
};
template <
typename Trait
, typename Expr
, typename State
, typename Data
, bool IsTransform = proto::is_transform::value
>
struct is_nullary_custom_terminal_impl
{
typedef typename Trait::type result_type;
};
template
struct is_nullary_custom_terminal_impl
{
typedef
typename Transform::template impl<
Expr
, State
, Data
>::result_type
result_type;
};
template
struct is_nullary::when
{
BOOST_PROTO_TRANSFORM(is_nullary::when)
template
struct impl
: is_nullary_custom_terminal_impl<
result_of::is_nullary<
custom_terminal<
typename proto::detail::uncvref<
typename proto::result_of::value::type
>::type
>
>
, typename proto::result_of::value::type
, State
, Data
>
{};
};
template
struct is_nullary::when
{
BOOST_PROTO_TRANSFORM(is_nullary::when)
template
struct impl
{
typedef mpl::true_ result_type;
};
};
namespace result_of
{
template
struct is_nullary
: boost::phoenix::evaluator::impl<
Expr const &
, vector2<
mpl::true_
, boost::phoenix::is_nullary
>
, proto::empty_env
>::result_type
{};
template
struct is_nullary
: is_nullary
{};
template
struct is_nullary
: is_nullary
{};
template
struct is_nullary
: is_nullary
{};
template
struct is_nullary >
: mpl::true_
{};
template
struct is_nullary > >
: evaluator
{};
template
struct is_nullary > > >
{
BOOST_PROTO_TRANSFORM(is_nullary > > >)
template
struct impl
{
typedef typename evaluator::template impl, State, Data>::result_type result_type;
};
};
template
struct is_nullary const> > >
{
BOOST_PROTO_TRANSFORM(is_nullary const> > >)
template
struct impl
{
typedef typename evaluator::template impl const, State, Data>::result_type result_type;
};
};
}
}}
#endif