Search Results

Search found 1 results on 1 pages for 'stefaanv'.

Page 1/1 | 1 

  • Better name needed for applying a function on elements of a container

    - by stefaanv
    I have a container class (containing a multi-index container) for which I have a public "foreach" member-function, so users can pass a functor to apply on all elements. While implementing, I had a case where the functor should only be applied to some elements of a range in the container, so I overloaded the foreach, to pass some valid range. Now, in some cases, it was worthwhile to stop on a certain condition, so practically, I let the foreach stop based on the return-value of the function. I'm pleased with how the system works, but I have one concern: How should a "foreach" on a range, with stop conditions be called? Anyone knows a generic, clear and concise name?

    Read the article

1