Loading...
Searching...
No Matches
Null_output_iterator.h
1/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
2 * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
3 * Author(s): Marc Glisse
4 *
5 * Copyright (C) 2017 Inria
6 *
7 * Modification(s):
8 * - YYYY/MM Author: Description of the modification
9 */
10
11#ifndef NULL_OUTPUT_ITERATOR_H_
12#define NULL_OUTPUT_ITERATOR_H_
13
14#include <iterator>
15
16namespace Gudhi {
17
20 typedef std::output_iterator_tag iterator_category;
21 typedef void value_type;
22 typedef void difference_type;
23 typedef void pointer;
24 typedef void reference;
25
26 Null_output_iterator& operator++() {return *this;}
27 Null_output_iterator operator++(int) {return *this;}
28 struct proxy {
29 template<class T>
30 proxy& operator=(T&&){return *this;}
31 };
32 proxy operator*()const{return {};}
33};
34} // namespace Gudhi
35
36#endif // NULL_OUTPUT_ITERATOR_H_
Definition: Null_output_iterator.h:19