Changeset 1b8fc06c for src/Common


Ignore:
Timestamp:
Apr 13, 2023, 4:47:05 PM (20 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
8a2f7f1, fb4dc28
Parents:
32d6fdc
Message:

Updated Iterate.hpp documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/Iterate.hpp

    r32d6fdc r1b8fc06c  
    2020#include <iterator>
    2121
    22 // it's nice to actually be able to increment iterators by an arbitrary amount
     22// Returns an iterator that is it advanced n times.
    2323template< class InputIt, class Distance >
    2424InputIt operator+( InputIt it, Distance n ) {
     
    5050
    5151// -----------------------------------------------------------------------------
     52// Helper struct and function to support
     53// for ( val_and_index : enumerate( container ) ) {}
     54// which iterates through the container and tracks the index as well.
     55
    5256template< typename T >
    5357struct enumerate_t {
     
    109113
    110114// -----------------------------------------------------------------------------
     115// Helper function to transform one iterable container into another.
     116
    111117template< typename OutType, typename Range, typename Functor >
    112118OutType map_range( const Range& range, Functor&& functor ) {
     
    206212// Helper struct and function to support
    207213// for ( val : lazy_map( container1, f ) ) {}
    208 // syntax to have a for each that iterates a container, mapping each element by applying f
     214// syntax to have a for each that iterates a container,
     215// mapping each element by applying f.
     216
    209217template< typename T, typename Func >
    210218struct lambda_iterate_t {
Note: See TracChangeset for help on using the changeset viewer.