TooN Algorithm Library - tag  0.2
Namespaces | Classes | Functions
additional iterators
Collaboration diagram for additional iterators:

Namespaces

namespace  tag::Internal
 

Classes

struct  tag::member_iterator_t< It, m >
 

Functions

template<typename It , typename m >
struct member_iterator_t< It, m > tag::member_const_iterator (const It &it, m std::iterator_traits< It >::value_type::*d)
 
template<typename It , typename m >
struct member_iterator_t< It, m > tag::member_iterator (It it, m std::iterator_traits< It >::value_type::*d)
 

Detailed Description

This group provides additional iterators to complement the <iterator> header of STL.

Function Documentation

template<typename It , typename m >
struct member_iterator_t< It, m > tag::member_const_iterator ( const It &  it,
m std::iterator_traits< It >::value_type::*  d 
)
read

helper function to simplify the use of member_iterator_t wrapper. This is useful for passing member iterators as arguments.

  • it the const iterator to wrap, the new member_iterator_t returned will point to the same position
  • d the member to wrap
    struct simple { int a; float b; };
    vector<simple> test;
    for_each(member_iterator(test.begin(), &simple::a), member_iterator(test.end(), &simple::a), ... );
template<typename It , typename m >
struct member_iterator_t< It, m > tag::member_iterator ( It  it,
m std::iterator_traits< It >::value_type::*  d 
)
read