...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::proto::call::impl
// In header: <boost/proto/transform/call.hpp>
template<typename Expr, typename State, typename Data>
struct impl : proto::transform_impl<Expr, State, Data> {
// types
typedef see-below
result_type;
// public member functions
result_type operator()(typename impl::expr_param,
typename impl::state_param,
typename impl::data_param) const;
};
impl
public
types
typedef see-below
result_type;
In the description that follows, a type T
is determined to model the
PrimitiveTransform concept if
proto::is_transform<T>::value
is
true
.
proto::call<T>::impl<Expr,State,Data>::result_type
is computed as follows:
If T
if of the form
PrimitiveTransform
or
PrimitiveTransform()
, then
result_type
is:
typename boost::result_of<PrimitiveTransform(Expr, State, Data)>::type
If T
is of the form
PrimitiveTransform(A0)
, then
result_type
is:
typename boost::result_of<PrimitiveTransform( typename boost::result_of<when<_,A0>(Expr, State, Data)>::type, State, Data )>::type
If T
is of the form
PrimitiveTransform(A0, A1)
, then
result_type
is:
typename boost::result_of<PrimitiveTransform( typename boost::result_of<when<_,A0>(Expr, State, Data)>::type, typename boost::result_of<when<_,A1>(Expr, State, Data)>::type, Data )>::type
If T
is of the form
PrimitiveTransform(A0, A1, A2)
, then
result_type
is:
typename boost::result_of<PrimitiveTransform( typename boost::result_of<when<_,A0>(Expr, State, Data)>::type, typename boost::result_of<when<_,A1>(Expr, State, Data)>::type, typename boost::result_of<when<_,A2>(Expr, State, Data)>::type )>::type
If T
is of the form
PolymorphicFunctionObject(A0,...An)
, then
result_type
is:
typename boost::result_of<PolymorphicFunctionObject( typename boost::result_of<when<_,A0>(Expr, State, Data)>::type, ... typename boost::result_of<when<_,An>(Expr, State, Data)>::type >::type
impl
public member functionsresult_type operator()(typename impl::expr_param expr, typename impl::state_param state, typename impl::data_param data) const;
In the description that follows, a type T
is determined to model the
PrimitiveTransform concept if
is
proto::is_transform
<T>::valuetrue
.
behaves as follows:
proto::call
<T>::impl<Expr,State,Data>::operator()
If T
if of the form
PrimitiveTransform
or
PrimitiveTransform()
, then
return
PrimitiveTransform()(expr, state, data)
If T
is of the form
PrimitiveTransform(A0)
, then
return
PrimitiveTransform()(when
<_
,A0>()(expr, state, data), state, sata )
If T
is of the form
PrimitiveTransform(A0, A1)
, then
return:
PrimitiveTransform()(when
<_
,A0>()(expr, state, data),when
<_
,A1>()(expr, state, data), Data )
If T
is of the form
PrimitiveTransform(A0, A1, A2)
, then
return
PrimitiveTransform()(when
<_
,A0>()(expr, state, data),when
<_
,A1>()(expr, state, data),when
<_
,A2>()(expr, state, data) )
If T
is of the form
PolymorphicFunctionObject(A0,...An)
, then
return:
PolymorphicFunctionObject()(when
<_
,A0>()(expr, state, data), ...when
<_
,An>()(expr, state, data) )