/usr/include/boost/phoenix/object
Edit: /usr/include/boost/phoenix/object/new.hpp (2414B)
/*==============================================================================
Copyright (c) 2001-2010 Joel de Guzman
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_OBJECT_NEW_HPP
#define BOOST_PHOENIX_OBJECT_NEW_HPP
#include
#include
#include
#include
#include
#include
#include
#ifdef BOOST_PHOENIX_NO_VARIADIC_EXPRESSION
# include
#else
BOOST_PHOENIX_DEFINE_EXPRESSION_VARARG(
(boost)(phoenix)(new_)
, (proto::terminal >)
(meta_grammar)
, _
)
#endif
namespace boost { namespace phoenix
{
struct new_eval
{
template
struct result;
#if defined(BOOST_PHOENIX_NO_VARIADIC_OBJECT)
template
struct result
{
typedef typename detail::result_of::target target_type;
typedef typename target_type::type * type;
};
template
typename detail::result_of::target::type *
operator()(Target, Context const &) const
{
return new typename detail::result_of::target::type;
}
// Bring in the rest
#include
#else
// TODO:
#endif
};
template
struct default_actions::when
: call
{};
#if defined(BOOST_PHOENIX_NO_VARIADIC_OBJECT)
template
inline
typename expression::new_ >::type const
new_()
{
return
expression::
new_ >::
make(detail::target());
}
// Bring in the rest
#include
#else
// TODO:
#endif
}}
#endif