blob: 813090808808afa1b559bdb7e8e516e1b07969dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/* This file is part of the Gudhi Library. The Gudhi library
* (Geometric Understanding in Higher Dimensions) is a generic C++
* library for computational topology.
*
* Author(s): Marc Glisse
*
* Copyright (C) 2017 Inria
*
* Modification(s):
* - YYYY/MM Author: Description of the modification
*/
#ifndef NULL_OUTPUT_ITERATOR_H_
#define NULL_OUTPUT_ITERATOR_H_
#include <iterator>
namespace Gudhi {
/** An output iterator that ignores whatever it is given. */
struct Null_output_iterator {
typedef std::output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
Null_output_iterator& operator++() {return *this;}
Null_output_iterator operator++(int) {return *this;}
struct proxy {
template<class T>
proxy& operator=(T&&){return *this;}
};
proxy operator*()const{return {};}
};
} // namespace Gudhi
#endif // NULL_OUTPUT_ITERATOR_H_
|