CXXIter 0.2
Loading...
Searching...
No Matches
TraitImpl.h
1#pragma once
2
3#include <cstddef>
4
5#include "../Traits.h"
6
8namespace CXXIter::util {
9
17 template<typename TSelf>
18 static constexpr inline size_t advanceByPull(TSelf& self, size_t n) {
19 size_t skipN = 0;
20 while(skipN < n) {
22 skipN += 1;
23 }
24 return skipN;
25 }
26
34 template<typename TSelf>
35 static constexpr inline size_t advanceByPullBack(TSelf& self, size_t n) {
36 size_t skipN = 0;
37 while(skipN < n) {
38 trait::Iterator<TSelf>::nextBack(self);
39 skipN += 1;
40 }
41 return skipN;
42 }
43
44}
static constexpr IterValue< Item > next(Self &self)=delete
Pull one element from the iterator pipeline previous to this pipeline-element.