SeqAn3  3.0.1
The Modern C++ library for sequence analysis.
ignore_output_iterator.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
13 #pragma once
14 
15 #include <seqan3/core/platform.hpp>
16 
17 namespace seqan3::detail
18 {
19 
29 class ignore_output_iterator
30 {
31 public:
32 
39  using value_type = void;
42  using reference = void;
44  using pointer = void;
46  using difference_type = std::ptrdiff_t;
48  using iterator_category = std::output_iterator_tag;
50 
54  ignore_output_iterator() = default;
55  ignore_output_iterator(ignore_output_iterator const &) = default;
56  ignore_output_iterator(ignore_output_iterator &&) = default;
57  ignore_output_iterator & operator= (ignore_output_iterator const &) = default;
58  ignore_output_iterator & operator= (ignore_output_iterator &&) = default;
59  ~ignore_output_iterator() = default;
60 
67  template <typename type>
69  constexpr ignore_output_iterator & operator= (type const /*v*/) noexcept
70  {
71  return *this;
72  }
73 
75  constexpr ignore_output_iterator & operator* () noexcept
76  {
77  return *this;
78  }
79 
81  constexpr ignore_output_iterator & operator++ () noexcept
82  {
83  return *this;
84  }
85 
87  constexpr ignore_output_iterator & operator++ (int) noexcept
88  {
89  return *this;
90  }
92 };
93 
94 } // namespace seqan3::detail
std::output_iterator_tag
platform.hpp
Provides platform and dependency checks.
std::ptrdiff_t