diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-04-10 16:40:38 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-04-10 16:40:38 +0000 |
commit | 7c018fc5120bf25b88bc287f0f5793984b3e4732 (patch) | |
tree | 82dc822e23f276daec84cc09a0fb410c31c40bfe /src/common/include | |
parent | eb0bd21b93509e8a2cb9485ac46dcba128893538 (diff) | |
parent | d6a275cde67490784f1f7a4362c07a1132672344 (diff) |
Merge branch farthest distance
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@2330 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: fc24c2112694ac41b71a639ccc6da7351afcefc2
Diffstat (limited to 'src/common/include')
-rw-r--r-- | src/common/include/gudhi/Null_output_iterator.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/common/include/gudhi/Null_output_iterator.h b/src/common/include/gudhi/Null_output_iterator.h new file mode 100644 index 00000000..0cf043cd --- /dev/null +++ b/src/common/include/gudhi/Null_output_iterator.h @@ -0,0 +1,48 @@ +/* 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 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#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_ |