Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
IteratorRange.h
Go to the documentation of this file.
1 
8 #ifndef INCLUDE_MOLASSEMBLER_RANGE_H
9 #define INCLUDE_MOLASSEMBLER_RANGE_H
10 
11 #include "Molassembler/Export.h"
12 #include <utility>
13 
14 namespace Scine {
15 namespace Molassembler {
16 
25 template<typename Iter>
26 struct MASM_EXPORT IteratorRange {
27  Iter first;
28  Iter second;
29 
30  IteratorRange() = default;
31  IteratorRange(Iter a, Iter b) : first(std::move(a)), second(std::move(b)) {}
32 
33  inline Iter begin() const {
34  return first;
35  }
36 
37  inline Iter end() const {
38  return second;
39  }
40 };
41 
42 } // namespace Molassembler
43 } // namespace Scine
44 
45 #endif
constexpr Get< 1 > second
Calls std::get&lt;1&gt; on any argument it is invoked with.
Definition: Functor.h:125
Homogeneous pair of iterators with begin and end member fns.
Definition: IteratorRange.h:26
constexpr Get< 0 > first
Calls std::get&lt;0&gt; on any argument it is invoked with.
Definition: Functor.h:123