Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
foreach.hpp File Reference
Include dependency graph for foreach.hpp:
This graph shows which files directly or indirectly include this file:

Classes

singleton  boost::iterator_range< IteratorT >
 iterator_range class More...
 
class  boost::sub_range< ForwardRange >
 
struct  boost::foreach::is_lightweight_proxy< T >
 
struct  boost::foreach::is_noncopyable< T >
 
struct  boost::foreach_detail_::auto_any_base
 
struct  boost::foreach_detail_::auto_any< T >
 
struct  boost::foreach_detail_::type2type< T, C >
 
struct  boost::foreach_detail_::wrap_cstr< T >
 
struct  boost::foreach_detail_::wrap_cstr< char * >
 
struct  boost::foreach_detail_::wrap_cstr< char const * >
 
struct  boost::foreach_detail_::wrap_cstr< wchar_t * >
 
struct  boost::foreach_detail_::wrap_cstr< wchar_t const * >
 
struct  boost::foreach_detail_::is_char_array< T >
 
struct  boost::foreach_detail_::foreach_iterator< T, C >
 
struct  boost::foreach_detail_::foreach_reverse_iterator< T, C >
 
struct  boost::foreach_detail_::foreach_reference< T, C >
 

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::foreach
 
 boost::foreach_detail_
 

Macros

#define BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION
 
#define BOOST_FOREACH_TAG_DEFAULT   boost::foreach::tag
 
#define BOOST_FOREACH_DEREFOF(T)   (*T)
 
#define BOOST_FOREACH_IS_RVALUE(COL)   boost::foreach_detail_::is_rvalue_((COL), 0)
 
#define BOOST_FOREACH_SUPPRESS_WARNINGS()
 
#define BOOST_FOREACH_ID(x)   BOOST_PP_CAT(x, __LINE__)
 
#define BOOST_FOREACH_TYPEOF(COL)   (true ? 0 : boost::foreach_detail_::encode_type(COL, boost::foreach_detail_::is_const_(COL)))
 
#define BOOST_FOREACH_IS_NONCOPYABLE(COL)
 
#define BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL)
 
#define BOOST_FOREACH_PREAMBLE()   BOOST_FOREACH_SUPPRESS_WARNINGS()
 
#define BOOST_FOREACH_EVALUATE(COL)   (COL)
 
#define BOOST_FOREACH_SHOULD_COPY(COL)
 
#define BOOST_FOREACH_CONTAIN(COL)
 
#define BOOST_FOREACH_BEGIN(COL)
 
#define BOOST_FOREACH_END(COL)
 
#define BOOST_FOREACH_DONE(COL)
 
#define BOOST_FOREACH_NEXT(COL)
 
#define BOOST_FOREACH_DEREF(COL)
 
#define BOOST_FOREACH_RBEGIN(COL)
 
#define BOOST_FOREACH_REND(COL)
 
#define BOOST_FOREACH_RDONE(COL)
 
#define BOOST_FOREACH_RNEXT(COL)
 
#define BOOST_FOREACH_RDEREF(COL)
 
#define BOOST_FOREACH(VAR, COL)
 
#define BOOST_REVERSE_FOREACH(VAR, COL)
 

Typedefs

typedef auto_any_base const & boost::foreach_detail_::auto_any_t
 
typedef boost::mpl::true_ boost::foreach_detail_::const_
 

Functions

template<typename T >
std::pair< T, Tboost::foreach::in_range (T begin, T end)
 
template<typename T >
boost::foreach::is_lightweight_proxy
< T > * 
boost_foreach_is_lightweight_proxy (T *&, boost::foreach::tag)
 
template<typename T >
boost::mpl::true_boost_foreach_is_lightweight_proxy (std::pair< T, T > *&, boost::foreach::tag)
 
template<typename T >
boost::mpl::true_boost_foreach_is_lightweight_proxy (boost::iterator_range< T > *&, boost::foreach::tag)
 
template<typename T >
boost::mpl::true_boost_foreach_is_lightweight_proxy (boost::sub_range< T > *&, boost::foreach::tag)
 
template<typename T >
boost::mpl::true_boost_foreach_is_lightweight_proxy (T **&, boost::foreach::tag)
 
template<typename T >
boost::foreach::is_noncopyable
< T > * 
boost_foreach_is_noncopyable (T *&, boost::foreach::tag)
 
template<typename Bool1 , typename Bool2 >
boost::mpl::and_< Bool1, Bool2 > * boost::foreach_detail_::and_ (Bool1 *, Bool2 *)
 
template<typename Bool1 , typename Bool2 , typename Bool3 >
boost::mpl::and_< Bool1, Bool2,
Bool3 > * 
boost::foreach_detail_::and_ (Bool1 *, Bool2 *, Bool3 *)
 
template<typename Bool1 , typename Bool2 >
boost::mpl::or_< Bool1, Bool2 > * boost::foreach_detail_::or_ (Bool1 *, Bool2 *)
 
template<typename Bool1 , typename Bool2 , typename Bool3 >
boost::mpl::or_< Bool1, Bool2,
Bool3 > * 
boost::foreach_detail_::or_ (Bool1 *, Bool2 *, Bool3 *)
 
template<typename Bool1 >
boost::mpl::not_< Bool1 > * boost::foreach_detail_::not_ (Bool1 *)
 
template<typename T >
boost::is_array< T > * boost::foreach_detail_::is_array_ (T const &)
 
template<typename T >
boost::is_const< T > * boost::foreach_detail_::is_const_ (T &)
 
template<typename T >
boost::mpl::true_boost::foreach_detail_::is_const_ (T const &)
 
template<typename T >
boost::is_rvalue_reference< T && > * boost::foreach_detail_::is_rvalue_ (T &&, int)
 
template<typename T , typename C >
BOOST_DEDUCED_TYPENAME
boost::mpl::if_< C, T const, T >
::type & 
boost::foreach_detail_::auto_any_cast (auto_any_t a)
 
template<typename T >
type2type< T > * boost::foreach_detail_::encode_type (T &, boost::mpl::false_ *)
 
template<typename T >
type2type< T, const_ > * boost::foreach_detail_::encode_type (T const &, boost::mpl::true_ *)
 
bool boost::foreach_detail_::set_false (bool &b)
 
template<typename T >
T *& boost::foreach_detail_::to_ptr (T const &)
 
template<typename T >
auto_any< Tboost::foreach_detail_::contain (T const &t, boost::mpl::true_ *)
 
template<typename T >
auto_any< T * > boost::foreach_detail_::contain (T &t, boost::mpl::false_ *)
 
template<typename T , typename C >
auto_any
< BOOST_DEDUCED_TYPENAME
foreach_iterator< T, C >::type > 
boost::foreach_detail_::begin (auto_any_t col, type2type< T, C > *, boost::mpl::true_ *)
 
template<typename T , typename C >
auto_any
< BOOST_DEDUCED_TYPENAME
foreach_iterator< T, C >::type > 
boost::foreach_detail_::begin (auto_any_t col, type2type< T, C > *, boost::mpl::false_ *)
 
template<typename T , typename C >
auto_any< T * > boost::foreach_detail_::begin (auto_any_t col, type2type< T *, C > *, boost::mpl::true_ *)
 
template<typename T , typename C >
auto_any
< BOOST_DEDUCED_TYPENAME
foreach_iterator< T, C >::type > 
boost::foreach_detail_::end (auto_any_t col, type2type< T, C > *, boost::mpl::true_ *)
 
template<typename T , typename C >
auto_any
< BOOST_DEDUCED_TYPENAME
foreach_iterator< T, C >::type > 
boost::foreach_detail_::end (auto_any_t col, type2type< T, C > *, boost::mpl::false_ *)
 
template<typename T , typename C >
auto_any< int > boost::foreach_detail_::end (auto_any_t, type2type< T *, C > *, boost::mpl::true_ *)
 
template<typename T , typename C >
bool boost::foreach_detail_::done (auto_any_t cur, auto_any_t end, type2type< T, C > *)
 
template<typename T , typename C >
bool boost::foreach_detail_::done (auto_any_t cur, auto_any_t, type2type< T *, C > *)
 
template<typename T , typename C >
void boost::foreach_detail_::next (auto_any_t cur, type2type< T, C > *)
 
template<typename T , typename C >
BOOST_DEDUCED_TYPENAME
foreach_reference< T, C >
::type 
boost::foreach_detail_::deref (auto_any_t cur, type2type< T, C > *)
 
template<typename T , typename C >
auto_any
< BOOST_DEDUCED_TYPENAME
foreach_reverse_iterator< T, C >
::type > 
boost::foreach_detail_::rbegin (auto_any_t col, type2type< T, C > *, boost::mpl::true_ *)
 
template<typename T , typename C >
auto_any
< BOOST_DEDUCED_TYPENAME
foreach_reverse_iterator< T, C >
::type > 
boost::foreach_detail_::rbegin (auto_any_t col, type2type< T, C > *, boost::mpl::false_ *)
 
template<typename T , typename C >
auto_any< reverse_iterator< T * > > boost::foreach_detail_::rbegin (auto_any_t col, type2type< T *, C > *, boost::mpl::true_ *)
 
template<typename T , typename C >
auto_any
< BOOST_DEDUCED_TYPENAME
foreach_reverse_iterator< T, C >
::type > 
boost::foreach_detail_::rend (auto_any_t col, type2type< T, C > *, boost::mpl::true_ *)
 
template<typename T , typename C >
auto_any
< BOOST_DEDUCED_TYPENAME
foreach_reverse_iterator< T, C >
::type > 
boost::foreach_detail_::rend (auto_any_t col, type2type< T, C > *, boost::mpl::false_ *)
 
template<typename T , typename C >
auto_any< reverse_iterator< T * > > boost::foreach_detail_::rend (auto_any_t col, type2type< T *, C > *, boost::mpl::true_ *)
 
template<typename T , typename C >
bool boost::foreach_detail_::rdone (auto_any_t cur, auto_any_t end, type2type< T, C > *)
 
template<typename T , typename C >
void boost::foreach_detail_::rnext (auto_any_t cur, type2type< T, C > *)
 
template<typename T , typename C >
BOOST_DEDUCED_TYPENAME
foreach_reference< T, C >
::type 
boost::foreach_detail_::rderef (auto_any_t cur, type2type< T, C > *)
 

Macro Definition Documentation

#define BOOST_FOREACH (   VAR,
  COL 
)
Value:
for (bool BOOST_FOREACH_ID(_foreach_continue) = true; \
BOOST_FOREACH_ID(_foreach_continue) && !BOOST_FOREACH_DONE(COL); \
BOOST_FOREACH_ID(_foreach_continue) ? BOOST_FOREACH_NEXT(COL) : (void)0) \
if (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_continue))) {} else \
for (VAR = BOOST_FOREACH_DEREF(COL); !BOOST_FOREACH_ID(_foreach_continue); BOOST_FOREACH_ID(_foreach_continue) = true)
#define BOOST_FOREACH_END(COL)
Definition: foreach.hpp:1016
void
Definition: is_convertible.hpp:460
#define BOOST_FOREACH_CONTAIN(COL)
Definition: foreach.hpp:1005
#define BOOST_FOREACH_BEGIN(COL)
Definition: foreach.hpp:1010
bool set_false(bool &b)
Definition: foreach.hpp:409
Duration formatting facet for input.
Definition: accumulators_fwd.hpp:55
#define BOOST_FOREACH_PREAMBLE()
Definition: foreach.hpp:928
if(num_vertices(iG)!=num_vertices(vG)) return
#define BOOST_FOREACH_ID(x)
Definition: foreach.hpp:901
#define BOOST_FOREACH_DONE(COL)
Definition: foreach.hpp:1022
#define BOOST_FOREACH_DEREF(COL)
Definition: foreach.hpp:1033
auto_any_base const & auto_any_t
Definition: foreach.hpp:266
for(;it!=topo_order.rend();++it,++n)
Definition: transitive_reduction.hpp:67
#define BOOST_FOREACH_NEXT(COL)
Definition: foreach.hpp:1028

Referenced by boost::spirit::lex::lexertl::lexer< Token, Iterator, Functor >::add_action(), boost::spirit::x3::tst_map< Char, T >::clear(), boost::spirit::qi::tst_map< Char, T >::clear(), boost::python::container_utils::extend_container(), boost::detail::graph::mutate_graph_impl< compressed_sparse_row_graph< Directed, VertexProperty, EdgeProperty, GraphProperty, Vertex, EdgeIndex > >::finish_building_graph(), boost::spirit::x3::tst_map< Char, T >::for_each(), boost::spirit::qi::tst_map< Char, T >::for_each(), boost::spirit::basic_info_walker< Callback >::operator()(), boost::spirit::qi::permutation< Elements >::parse(), boost::spirit::repository::qi::keywords< Elements, Modifiers >::parse_impl(), boost::detail::parallel::save_in_edges(), boost::spirit::x3::to_utf8(), and boost::spirit::to_utf8().

#define BOOST_FOREACH_BEGIN (   COL)
Value:
BOOST_FOREACH_ID(_foreach_col) \
#define BOOST_FOREACH_ID(x)
Definition: foreach.hpp:901
#define BOOST_FOREACH_TYPEOF(COL)
Definition: foreach.hpp:905
#define BOOST_FOREACH_SHOULD_COPY(COL)
Definition: foreach.hpp:935
auto_any< BOOST_DEDUCED_TYPENAME foreach_iterator< T, C >::type > begin(auto_any_t col, type2type< T, C > *, boost::mpl::true_ *)
Definition: foreach.hpp:654
#define BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION
#define BOOST_FOREACH_CONTAIN (   COL)
Value:
#define BOOST_FOREACH_EVALUATE(COL)
Definition: foreach.hpp:932
#define BOOST_FOREACH_SHOULD_COPY(COL)
Definition: foreach.hpp:935
auto_any< T > contain(T const &t, boost::mpl::true_ *)
Definition: foreach.hpp:624
#define BOOST_FOREACH_DEREF (   COL)
Value:
BOOST_FOREACH_ID(_foreach_cur) \
#define BOOST_FOREACH_ID(x)
Definition: foreach.hpp:901
#define BOOST_FOREACH_TYPEOF(COL)
Definition: foreach.hpp:905
BOOST_DEDUCED_TYPENAME foreach_reference< T, C >::type deref(auto_any_t cur, type2type< T, C > *)
Definition: foreach.hpp:762
#define BOOST_FOREACH_DONE (   COL)
Value:
BOOST_FOREACH_ID(_foreach_cur) \
, BOOST_FOREACH_ID(_foreach_end) \
#define BOOST_FOREACH_ID(x)
Definition: foreach.hpp:901
bool done(auto_any_t cur, auto_any_t end, type2type< T, C > *)
Definition: foreach.hpp:733
#define BOOST_FOREACH_TYPEOF(COL)
Definition: foreach.hpp:905
#define BOOST_FOREACH_END (   COL)
Value:
BOOST_FOREACH_ID(_foreach_col) \
#define BOOST_FOREACH_ID(x)
Definition: foreach.hpp:901
#define BOOST_FOREACH_TYPEOF(COL)
Definition: foreach.hpp:905
auto_any< BOOST_DEDUCED_TYPENAME foreach_iterator< T, C >::type > end(auto_any_t col, type2type< T, C > *, boost::mpl::true_ *)
Definition: foreach.hpp:694
#define BOOST_FOREACH_SHOULD_COPY(COL)
Definition: foreach.hpp:935
#define BOOST_FOREACH_EVALUATE (   COL)    (COL)
#define BOOST_FOREACH_ID (   x)    BOOST_PP_CAT(x, __LINE__)
#define BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY (   COL)
Value:
boost::mpl::and_< Bool1, Bool2 > * and_(Bool1 *, Bool2 *)
Definition: foreach.hpp:203
#define BOOST_FOREACH_IS_NONCOPYABLE(COL)
Definition: foreach.hpp:909
T *& to_ptr(T const &)
Definition: foreach.hpp:419
boost::foreach::is_lightweight_proxy< T > * boost_foreach_is_lightweight_proxy(T *&, boost::foreach::tag)
Definition: foreach.hpp:166
boost::mpl::not_< Bool1 > * not_(Bool1 *)
Definition: foreach.hpp:215
#define BOOST_FOREACH_IS_NONCOPYABLE (   COL)
Value:
T *& to_ptr(T const &)
Definition: foreach.hpp:419
boost::foreach::is_noncopyable< T > * boost_foreach_is_noncopyable(T *&, boost::foreach::tag)
Definition: foreach.hpp:191
#define BOOST_FOREACH_IS_RVALUE (   COL)    boost::foreach_detail_::is_rvalue_((COL), 0)
#define BOOST_FOREACH_NEXT (   COL)
Value:
BOOST_FOREACH_ID(_foreach_cur) \
#define BOOST_FOREACH_ID(x)
Definition: foreach.hpp:901
#define BOOST_FOREACH_TYPEOF(COL)
Definition: foreach.hpp:905
void next(auto_any_t cur, type2type< T, C > *)
Definition: foreach.hpp:751
#define BOOST_FOREACH_PREAMBLE ( )    BOOST_FOREACH_SUPPRESS_WARNINGS()
#define BOOST_FOREACH_RBEGIN (   COL)
Value:
BOOST_FOREACH_ID(_foreach_col) \
#define BOOST_FOREACH_ID(x)
Definition: foreach.hpp:901
#define BOOST_FOREACH_TYPEOF(COL)
Definition: foreach.hpp:905
#define BOOST_FOREACH_SHOULD_COPY(COL)
Definition: foreach.hpp:935
auto_any< BOOST_DEDUCED_TYPENAME foreach_reverse_iterator< T, C >::type > rbegin(auto_any_t col, type2type< T, C > *, boost::mpl::true_ *)
Definition: foreach.hpp:773
#define BOOST_FOREACH_RDEREF (   COL)
Value:
BOOST_FOREACH_ID(_foreach_cur) \
BOOST_DEDUCED_TYPENAME foreach_reference< T, C >::type rderef(auto_any_t cur, type2type< T, C > *)
Definition: foreach.hpp:877
#define BOOST_FOREACH_ID(x)
Definition: foreach.hpp:901
#define BOOST_FOREACH_TYPEOF(COL)
Definition: foreach.hpp:905
#define BOOST_FOREACH_RDONE (   COL)
Value:
BOOST_FOREACH_ID(_foreach_cur) \
, BOOST_FOREACH_ID(_foreach_end) \
bool rdone(auto_any_t cur, auto_any_t end, type2type< T, C > *)
Definition: foreach.hpp:856
#define BOOST_FOREACH_ID(x)
Definition: foreach.hpp:901
#define BOOST_FOREACH_TYPEOF(COL)
Definition: foreach.hpp:905
#define BOOST_FOREACH_REND (   COL)
Value:
BOOST_FOREACH_ID(_foreach_col) \
#define BOOST_FOREACH_ID(x)
Definition: foreach.hpp:901
#define BOOST_FOREACH_TYPEOF(COL)
Definition: foreach.hpp:905
#define BOOST_FOREACH_SHOULD_COPY(COL)
Definition: foreach.hpp:935
auto_any< BOOST_DEDUCED_TYPENAME foreach_reverse_iterator< T, C >::type > rend(auto_any_t col, type2type< T, C > *, boost::mpl::true_ *)
Definition: foreach.hpp:816
#define BOOST_FOREACH_RNEXT (   COL)
Value:
BOOST_FOREACH_ID(_foreach_cur) \
#define BOOST_FOREACH_ID(x)
Definition: foreach.hpp:901
#define BOOST_FOREACH_TYPEOF(COL)
Definition: foreach.hpp:905
void rnext(auto_any_t cur, type2type< T, C > *)
Definition: foreach.hpp:866
#define BOOST_FOREACH_SHOULD_COPY (   COL)
Value:
#define BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL)
Definition: foreach.hpp:915
#define BOOST_FOREACH_IS_RVALUE(COL)
Definition: foreach.hpp:461
boost::mpl::or_< Bool1, Bool2 > * or_(Bool1 *, Bool2 *)
Definition: foreach.hpp:209
#define BOOST_FOREACH_SUPPRESS_WARNINGS ( )
#define BOOST_FOREACH_TAG_DEFAULT   boost::foreach::tag
#define BOOST_FOREACH_TYPEOF (   COL)    (true ? 0 : boost::foreach_detail_::encode_type(COL, boost::foreach_detail_::is_const_(COL)))
#define BOOST_REVERSE_FOREACH (   VAR,
  COL 
)
Value:
for (bool BOOST_FOREACH_ID(_foreach_continue) = true; \
BOOST_FOREACH_ID(_foreach_continue) && !BOOST_FOREACH_RDONE(COL); \
BOOST_FOREACH_ID(_foreach_continue) ? BOOST_FOREACH_RNEXT(COL) : (void)0) \
if (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_continue))) {} else \
for (VAR = BOOST_FOREACH_RDEREF(COL); !BOOST_FOREACH_ID(_foreach_continue); BOOST_FOREACH_ID(_foreach_continue) = true)
void
Definition: is_convertible.hpp:460
#define BOOST_FOREACH_CONTAIN(COL)
Definition: foreach.hpp:1005
#define BOOST_FOREACH_RNEXT(COL)
Definition: foreach.hpp:1056
bool set_false(bool &b)
Definition: foreach.hpp:409
Duration formatting facet for input.
Definition: accumulators_fwd.hpp:55
#define BOOST_FOREACH_PREAMBLE()
Definition: foreach.hpp:928
if(num_vertices(iG)!=num_vertices(vG)) return
#define BOOST_FOREACH_REND(COL)
Definition: foreach.hpp:1044
#define BOOST_FOREACH_ID(x)
Definition: foreach.hpp:901
#define BOOST_FOREACH_RDEREF(COL)
Definition: foreach.hpp:1061
#define BOOST_FOREACH_RDONE(COL)
Definition: foreach.hpp:1050
#define BOOST_FOREACH_RBEGIN(COL)
Definition: foreach.hpp:1038
auto_any_base const & auto_any_t
Definition: foreach.hpp:266
for(;it!=topo_order.rend();++it,++n)
Definition: transitive_reduction.hpp:67

Function Documentation

template<typename T >
boost::foreach::is_lightweight_proxy<T>* boost_foreach_is_lightweight_proxy ( T *&  ,
boost::foreach::tag   
)
inline
template<typename T >
boost::mpl::true_* boost_foreach_is_lightweight_proxy ( std::pair< T, T > *&  ,
boost::foreach::tag   
)
inline
template<typename T >
boost::mpl::true_* boost_foreach_is_lightweight_proxy ( boost::iterator_range< T > *&  ,
boost::foreach::tag   
)
inline
template<typename T >
boost::mpl::true_* boost_foreach_is_lightweight_proxy ( boost::sub_range< T > *&  ,
boost::foreach::tag   
)
inline
template<typename T >
boost::mpl::true_* boost_foreach_is_lightweight_proxy ( T **&  ,
boost::foreach::tag   
)
inline
template<typename T >
boost::foreach::is_noncopyable<T>* boost_foreach_is_noncopyable ( T *&  ,
boost::foreach::tag   
)
inline