Boost.Geometry    Boost C++ Libraries
Classes | Public Types
boost::geometry::util::combine_if< Sequence1, Sequence2, Pred > Struct Template Reference

Meta-function to generate all the combination of pairs of types from a given sequence Sequence except those that does not satisfy the predicate Pred. More...

List of all members.

Classes

struct  combine

Public Types

typedef boost::mpl::fold
< Sequence1, boost::mpl::set0
<>, combine >::type 
type

Detailed Description

template<typename Sequence1, typename Sequence2, typename Pred>
struct boost::geometry::util::combine_if< Sequence1, Sequence2, Pred >

Meta-function to generate all the combination of pairs of types from a given sequence Sequence except those that does not satisfy the predicate Pred.

Example
        typedef boost::mpl::vector<boost::mpl::int_<0>, boost::mpl::int_<1> > types;
        typedef combine_if<types, types, always<true_> >::type combinations;
        typedef boost::mpl::vector<
            pair<boost::mpl::int_<1>, boost::mpl::int_<1> >,
            pair<boost::mpl::int_<1>, boost::mpl::int_<0> >,
            pair<boost::mpl::int_<0>, boost::mpl::int_<1> >,
            pair<boost::mpl::int_<0>, boost::mpl::int_<0> >        
        > result_types;
        
        BOOST_MPL_ASSERT(( boost::mpl::equal<combinations, result_types> ));

Member Typedef Documentation

template<typename Sequence1, typename Sequence2, typename Pred>
typedef boost::mpl::fold< Sequence1, boost::mpl::set0<>, combine >::type boost::geometry::util::combine_if< Sequence1, Sequence2, Pred >::type

April 2, 2011

Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands
Copyright © 2008-2011 Bruno Lalande, Paris, France
Copyright © 2009-2010 Mateusz Loskot, London, UK
Documentation is generated by Doxygen