Changes in src/Common/Iterate.hpp [1b8fc06c:8f06277]
- File:
-
- 1 edited
-
src/Common/Iterate.hpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/Iterate.hpp
r1b8fc06c r8f06277 20 20 #include <iterator> 21 21 22 // Returns an iterator that is it advanced n times.22 // it's nice to actually be able to increment iterators by an arbitrary amount 23 23 template< class InputIt, class Distance > 24 24 InputIt operator+( InputIt it, Distance n ) { … … 50 50 51 51 // ----------------------------------------------------------------------------- 52 // Helper struct and function to support53 // for ( val_and_index : enumerate( container ) ) {}54 // which iterates through the container and tracks the index as well.55 56 52 template< typename T > 57 53 struct enumerate_t { … … 113 109 114 110 // ----------------------------------------------------------------------------- 115 // Helper function to transform one iterable container into another.116 117 111 template< typename OutType, typename Range, typename Functor > 118 112 OutType map_range( const Range& range, Functor&& functor ) { … … 212 206 // Helper struct and function to support 213 207 // for ( val : lazy_map( container1, f ) ) {} 214 // syntax to have a for each that iterates a container, 215 // mapping each element by applying f. 216 208 // syntax to have a for each that iterates a container, mapping each element by applying f 217 209 template< typename T, typename Func > 218 210 struct lambda_iterate_t {
Note:
See TracChangeset
for help on using the changeset viewer.