#include <stlsoft/iterators/null_output_iterator.hpp>
This class template provides full backwards-compatibility with std::null_output_iterator, but offers the additional capability to supply both prefix and suffix to each delimited item.
For example, the following code indents each entry in the sequence as well as appending a carriage return.
std::vector<int> ints(10); { for(size_t i = 0; i < ints.size(); ++i) { ints[i] = i; }} std::cout << "Elements:" << std::endl; std::copy(ints.begin(), ints.end(), stlsoft::null_output_iterator<int>());
This has no effect, and produces no output. It does, however, cause the sequence to be enumerated, and its compilation ensures that all iterators support the codified operations.
V | The value type. |
Public Types | |
Member Types | |
typedef V | assigned_type |
The value type. | |
typedef null_output_iterator< V > | class_type |
The class type. | |
Public Member Functions | |
Ouput Iterator Methods | |
deref_proxy | operator* () |
class_type & | operator++ () |
class_type & | operator++ (int) |
Classes | |
class | deref_proxy |
typedef V assigned_type |
The value type.
typedef null_output_iterator<V> class_type |
The class type.