foreach.hpp File Reference

#include <cstddef>
#include <utility>
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/logical.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/noncopyable.hpp>
#include <boost/range/end.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/result_iterator.hpp>
#include <boost/type_traits/is_array.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/iterator/iterator_traits.hpp>
#include <boost/utility/addressof.hpp>
#include <new>
#include <boost/aligned_storage.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/remove_const.hpp>

Include dependency graph for foreach.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  boost
namespace  boost::foreach
namespace  boost::foreach_detail_

Classes

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_::foreach_iterator< T, C >
struct  boost::foreach_detail_::foreach_reference< T, C >
struct  boost::foreach_detail_::rvalue_probe< T >
struct  boost::foreach_detail_::simple_variant< T >

Defines

#define BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION
#define BOOST_FOREACH_PROTECT(expr)   (static_cast<boost::mpl::bool_<1 == sizeof(boost::foreach_detail_::is_true(expr))> *>(0))
#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()   if (bool _foreach_is_rvalue = false) {} else
#define BOOST_FOREACH_EVALUATE(COL)   (true ? boost::foreach_detail_::make_probe((COL), _foreach_is_rvalue) : (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(VAR, COL)
#define foreach   BOOST_FOREACH

Typedefs

typedef
boost_foreach_argument_dependent_lookup_hack 
boost::foreach::tag
typedef char boost::foreach_detail_::yes_type
typedef char(& boost::foreach_detail_::no_type )[2]
typedef auto_any_base const & boost::foreach_detail_::auto_any_t
typedef boost::mpl::true_ boost::foreach_detail_::const_

Enumerations

enum  boost_foreach_argument_dependent_lookup_hack { boost_foreach_argument_dependent_lookup_hack_value }

Functions

template<typename T>
std::pair< T, T > boost::foreach::in_range (T begin, T end)
template<typename T>
boost::foreach::is_lightweight_proxy
< T > * 
boost_foreach_is_lightweight_proxy (T *&,...)
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, std::size_t N>
boost::mpl::false_ * boost_foreach_is_lightweight_proxy (T(*)[N], boost::foreach::tag)
template<typename T>
boost::foreach::is_noncopyable
< T > * 
boost_foreach_is_noncopyable (T *&,...)
yes_type boost::foreach_detail_::is_true (boost::mpl::true_ *)
no_type boost::foreach_detail_::is_true (boost::mpl::false_ *)
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 Bool>
boost::mpl::not_< Bool > * boost::foreach_detail_::not_ (Bool *)
template<typename T>
boost::mpl::false_ * boost::foreach_detail_::is_rvalue (T &, int)
template<typename T>
boost::mpl::true_ * boost::foreach_detail_::is_rvalue (T const &,...)
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, 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>
T & boost::foreach_detail_::derefof (T *t)
template<typename T>
rvalue_probe< T > boost::foreach_detail_::make_probe (T &t, bool &b)
template<typename T>
rvalue_probe< T const > boost::foreach_detail_::make_probe (T const &t, bool &b)
template<typename LValue, typename IsProxy>
BOOST_DEDUCED_TYPENAME
boost::enable_if
< boost::mpl::or_< LValue,
IsProxy >, IsProxy >::type
boost::foreach_detail_::should_copy_impl (LValue *, IsProxy *, bool *)
bool * boost::foreach_detail_::should_copy_impl (boost::mpl::false_ *, boost::mpl::false_ *, bool *is_rvalue)
template<typename T>
auto_any< T > boost::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>
auto_any< simple_variant< T > > boost::foreach_detail_::contain (T const &t, bool *rvalue)
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>
auto_any
< BOOST_DEDUCED_TYPENAME
foreach_iterator< T, const_ >
::type
boost::foreach_detail_::begin (auto_any_t col, type2type< T, const_ > *, bool *)
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>
auto_any
< BOOST_DEDUCED_TYPENAME
foreach_iterator< T, const_ >
::type
boost::foreach_detail_::end (auto_any_t col, type2type< T, const_ > *, bool *)
template<typename T, typename C>
auto_any< int > boost::foreach_detail_::end (auto_any_t col, 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 > *)


Define Documentation

#define BOOST_FOREACH ( VAR,
COL   ) 

Value:

BOOST_FOREACH_PREAMBLE()                                                                    \
    if (boost::foreach_detail_::auto_any_t _foreach_col = BOOST_FOREACH_CONTAIN(COL)) {} else   \
    if (boost::foreach_detail_::auto_any_t _foreach_cur = BOOST_FOREACH_BEGIN(COL)) {} else     \
    if (boost::foreach_detail_::auto_any_t _foreach_end = BOOST_FOREACH_END(COL)) {} else       \
    for (bool _foreach_continue = true;                                                         \
              _foreach_continue && !BOOST_FOREACH_DONE(COL);                                    \
              _foreach_continue ? BOOST_FOREACH_NEXT(COL) : (void)0)                            \
        if  (boost::foreach_detail_::set_false(_foreach_continue)) {} else                      \
        for (VAR = BOOST_FOREACH_DEREF(COL); !_foreach_continue; _foreach_continue = true)

Definition at line 766 of file foreach.hpp.

Referenced by events::map_command_handler< events::console_handler >::get_aliases(), and events::map_command_handler< events::console_handler >::help().

#define BOOST_FOREACH_BEGIN ( COL   ) 

Value:

Definition at line 712 of file foreach.hpp.

#define BOOST_FOREACH_CONTAIN ( COL   ) 

#define BOOST_FOREACH_DEREF ( COL   ) 

Value:

Definition at line 735 of file foreach.hpp.

#define BOOST_FOREACH_DONE ( COL   ) 

Value:

boost::foreach_detail_::done(                                                               \
        _foreach_cur                                                                            \
      , _foreach_end                                                                            \
      , BOOST_FOREACH_TYPEOF(COL))

Definition at line 724 of file foreach.hpp.

#define BOOST_FOREACH_END ( COL   ) 

Value:

Definition at line 718 of file foreach.hpp.

#define BOOST_FOREACH_EVALUATE ( COL   )     (true ? boost::foreach_detail_::make_probe((COL), _foreach_is_rvalue) : (COL))

Definition at line 653 of file foreach.hpp.

#define BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY ( COL   ) 

#define BOOST_FOREACH_IS_NONCOPYABLE ( COL   ) 

#define BOOST_FOREACH_NEXT ( COL   ) 

Value:

Definition at line 730 of file foreach.hpp.

 
#define BOOST_FOREACH_PREAMBLE (  )     if (bool _foreach_is_rvalue = false) {} else

Definition at line 649 of file foreach.hpp.

#define BOOST_FOREACH_PROTECT ( expr   )     (static_cast<boost::mpl::bool_<1 == sizeof(boost::foreach_detail_::is_true(expr))> *>(0))

Definition at line 190 of file foreach.hpp.

#define BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION

Definition at line 52 of file foreach.hpp.

#define BOOST_FOREACH_SHOULD_COPY ( COL   ) 

#define BOOST_FOREACH_TYPEOF ( COL   )     (true ? 0 : boost::foreach_detail_::encode_type(COL, boost::foreach_detail_::is_const(COL)))

Definition at line 608 of file foreach.hpp.

#define foreach   BOOST_FOREACH

Definition at line 780 of file foreach.hpp.


Enumeration Type Documentation

Enumerator:
boost_foreach_argument_dependent_lookup_hack_value 

Definition at line 77 of file foreach.hpp.


Function Documentation

template<typename T, std::size_t N>
boost::mpl::false_* boost_foreach_is_lightweight_proxy ( T(*)  [N],
boost::foreach::tag   
) [inline]

Definition at line 164 of file foreach.hpp.

template<typename T>
boost::mpl::true_* boost_foreach_is_lightweight_proxy ( T **  ,
boost::foreach::tag   
) [inline]

Definition at line 160 of file foreach.hpp.

template<typename T>
boost::mpl::true_* boost_foreach_is_lightweight_proxy ( boost::sub_range< T > *&  ,
boost::foreach::tag   
) [inline]

Definition at line 156 of file foreach.hpp.

template<typename T>
boost::mpl::true_* boost_foreach_is_lightweight_proxy ( boost::iterator_range< T > *&  ,
boost::foreach::tag   
) [inline]

Definition at line 152 of file foreach.hpp.

template<typename T>
boost::mpl::true_* boost_foreach_is_lightweight_proxy ( std::pair< T, T > *&  ,
boost::foreach::tag   
) [inline]

Definition at line 148 of file foreach.hpp.

template<typename T>
boost::foreach::is_lightweight_proxy<T>* boost_foreach_is_lightweight_proxy ( T *&  ,
  ... 
) [inline]

Definition at line 144 of file foreach.hpp.

template<typename T>
boost::foreach::is_noncopyable<T>* boost_foreach_is_noncopyable ( T *&  ,
  ... 
) [inline]

Definition at line 173 of file foreach.hpp.


Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs