sources/list.h

changeset 185
e83ec58cc458
parent 182
20ca0a6be175
child 190
90bf9049e5eb
equal deleted inserted replaced
184:afd63357a03d 185:e83ec58cc458
30 30
31 #pragma once 31 #pragma once
32 #include <vector> 32 #include <vector>
33 #include <string> 33 #include <string>
34 #include "basics.h" 34 #include "basics.h"
35 #include "range.h"
36 BEGIN_ZFC_NAMESPACE 35 BEGIN_ZFC_NAMESPACE
37 36
38 template<typename T> 37 template<typename T>
39 using Vector = std::vector<T>; 38 using Vector = std::vector<T>;
40 39
59 result.push_back(container[i]); 58 result.push_back(container[i]);
60 } 59 }
61 return result; 60 return result;
62 } 61 }
63 62
64 template<typename T>
65 T splice(const T& container, Range<int>& range)
66 {
67 return splice(container, range.min(), range.max(), range.step());
68 }
69
70 END_ZFC_NAMESPACE 63 END_ZFC_NAMESPACE

mercurial