CGAL 5.1 - STL Extensions for CGAL
CGAL::Iterator_range< I > Class Template Reference

#include <CGAL/Iterator_range.h>

Inherits pair< I, I >.

Definition

template<typename I>
class CGAL::Iterator_range< I >

CGAL::Iterator_range encapsulates two iterators so they fulfill the ForwardRange concept. The class is essentially a clone of boost::iterator_range, and it additionally is derived from std::pair, so that one can apply boost::tie.

Public Types

typedef I iterator
 
typedef I const_iterator
 

Public Member Functions

 Iterator_range (I b, I e)
 
 Iterator_range (const std::pair< I, I > &ip)
 
begin () const
 
end () const
 
std::size_t size () const
 returns std::distance(begin(), end()) More...
 

Member Typedef Documentation

◆ const_iterator

template<typename I >
typedef I CGAL::Iterator_range< I >::const_iterator

◆ iterator

template<typename I >
typedef I CGAL::Iterator_range< I >::iterator

Constructor & Destructor Documentation

◆ Iterator_range() [1/2]

template<typename I >
CGAL::Iterator_range< I >::Iterator_range ( b,
e 
)

◆ Iterator_range() [2/2]

template<typename I >
CGAL::Iterator_range< I >::Iterator_range ( const std::pair< I, I > &  ip)

Member Function Documentation

◆ begin()

template<typename I >
I CGAL::Iterator_range< I >::begin ( ) const

◆ end()

template<typename I >
I CGAL::Iterator_range< I >::end ( ) const

◆ size()

template<typename I >
std::size_t CGAL::Iterator_range< I >::size ( ) const

returns std::distance(begin(), end())