CGAL 6.2 - IO Streams

Loading...
Searching...
No Matches
List of all members
CGAL::Istream_iterator< T, Stream > Class Template Reference
Reference Manual

`#include <CGAL/IO/Istream_iterator.h>`

## Definition

template<class T, class Stream>
class CGAL::Istream_iterator< T, Stream >

The class `Istream_iterator` is an input iterator adaptor for the input stream class `Stream` and value type `T`.

It is particularly useful for classes that are similar but not compatible to `std::istream`.

Is model of
  `InputIterator`

## Creation
| Istream_iterator ()
| creates an end-of-stream iterator.
| Istream_iterator (Stream &s)
| creates an input iterator reading from `s`.

## Constructor & Destructor Documentation

## ◆ Istream_iterator() [1/2]

template<class T , class Stream >

CGAL::Istream_iterator< T, Stream >::Istream_iterator | ( |  | ) |

creates an end-of-stream iterator.

This is a past-the-end iterator, and it is useful when constructing a range.

## ◆ Istream_iterator() [2/2]

template<class T , class Stream >

CGAL::Istream_iterator< T, Stream >::Istream_iterator | ( | Stream & | s | ) |

creates an input iterator reading from `s`.

When `s` reaches end of stream, this iterator will compare equal to an end-of-stream iterator created using the default constructor.