Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::proto::or_<> Struct Template Reference

For matching one of a set of alternate grammars. More...

#include <proto_fwd.hpp>

Inheritance diagram for boost::proto::or_<>:
Collaboration diagram for boost::proto::or_<>:

Classes

struct  impl
 
struct  impl< Expr &, State, Data >
 

Public Types

typedef or_ proto_grammar
 
typedef or_
< BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY,
G) > 
transform_type
 

Public Member Functions

 BOOST_PROTO_CALLABLE () typedef X proto_is_transform_
 
BOOST_FORCEINLINE
boost::proto::detail::apply_transform
< transform_type(Expr const &)>
::result_type 
operator() (Expr &&e) const
 
BOOST_FORCEINLINE
boost::proto::detail::apply_transform
< transform_type(Expr const
&, State const &)>
::result_type 
operator() (Expr &&e, State &&s) const
 
BOOST_FORCEINLINE
boost::proto::detail::apply_transform
< transform_type(Expr const
&, State const &, Data const &)>
::result_type 
operator() (Expr &&e, State &&s, Data &&d) const
 

Detailed Description

template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, typename G)>
struct boost::proto::or_<>

For matching one of a set of alternate grammars.

Alternates tried in order to avoid ambiguity. When used as a transform, or_<> applies the transform associated with the first grammar that matches the expression.

An expression type E matches or_<B0,B1,...Bn> if E matches any Bx for x in [0,n).

When applying or_<B0,B1,...Bn> as a transform with an expression e of type E, state s and data d, it is equivalent to Bx()(e, s, d), where x is the lowest number such that matches<E,Bx>value is true.

Member Typedef Documentation

template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, typename G) >
typedef or_ boost::proto::or_<>::proto_grammar

Member Function Documentation

boost::proto::transform< or_< BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, G) > , X >::BOOST_PROTO_CALLABLE ( )
inherited
BOOST_FORCEINLINE boost::proto::detail::apply_transform<transform_type(Expr const &, State const &, Data const &)>::result_type boost::proto::transform< or_< BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, G) > , X >::operator() ( Expr &&  e,
State &&  s,
Data &&  d 
) const
inlineinherited
BOOST_FORCEINLINE boost::proto::detail::apply_transform<transform_type(Expr const &, State const &)>::result_type boost::proto::transform< or_< BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, G) > , X >::operator() ( Expr &&  e,
State &&  s 
) const
inlineinherited

The documentation for this struct was generated from the following file: