Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Struct template bt_iterator_traits<T, true>

boost::unit_test::bt_iterator_traits<T, true>

Synopsis

// In header: <boost/test/utils/is_forward_iterable.hpp>

template<typename T> 
struct bt_iterator_traits<T, true> {
  // types
  typedef std::iterator_traits< const_iterator >::value_type value_type;

  // public member functions
   BOOST_STATIC_ASSERT((is_forward_iterable< T >::value));

  // public static functions
  static const_iterator begin(T const &);
  static const_iterator end(T const &);
  static std::size_t size(T const &);

  // private static functions
  static std::size_t size(T const &, std::true_type);
  static std::size_t size(T const &, std::false_type);

  // public data members
  decltype(boost::declval< typename boost::add_const< typename boost::remove_reference< T >::type >::type >().begin()) typedef const_iterator;
};

Description

bt_iterator_traits public member functions

  1.  BOOST_STATIC_ASSERT((is_forward_iterable< T >::value));

bt_iterator_traits public static functions

  1. static const_iterator begin(T const & container);
  2. static const_iterator end(T const & container);
  3. static std::size_t size(T const & container);

bt_iterator_traits private static functions

  1. static std::size_t size(T const & container, std::true_type);
  2. static std::size_t size(T const & container, std::false_type);

PrevUpHomeNext