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

A PolymorphicFunctionObject type that returns a "flattened" view of a Proto expression tree. More...

#include <fusion.hpp>

Classes

struct  result
 
struct  result< This(Expr &)>
 
struct  result< This(Expr)>
 

Public Member Functions

template<typename Expr >
proto::detail::flat_view< Expr >
const 
operator() (Expr &e) const
 
template<typename Expr >
proto::detail::flat_view< Expr
const > const 
operator() (Expr const &e) const
 

Detailed Description

A PolymorphicFunctionObject type that returns a "flattened" view of a Proto expression tree.

A PolymorphicFunctionObject type that returns a "flattened" view of a Proto expression tree. For a tree with a top-most node tag of type T, the elements of the flattened sequence are determined by recursing into each child node with the same tag type and returning those nodes of different type. So for instance, the Proto expression tree corresponding to the expression a | b | c has a flattened view with elements [a, b, c], even though the tree is grouped as ((a | b) | c).

Member Function Documentation

template<typename Expr >
proto::detail::flat_view<Expr> const boost::proto::functional::flatten::operator() ( Expr &  e) const
inline
template<typename Expr >
proto::detail::flat_view<Expr const> const boost::proto::functional::flatten::operator() ( Expr const &  e) const
inline

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