| 14 | |
| 15 | template <typename Fn> |
| 16 | void ForEach(Fn && fn) |
| 17 | { |
| 18 | ControlFlowWrapper<Fn> wrapper(std::forward<Fn>(fn)); |
| 19 | for (uint32_t i = 0; i < m_repetitions; ++i) |
| 20 | { |
| 21 | ++m_calls; |
| 22 | if (wrapper() == ControlFlow::Break) |
| 23 | return; |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | uint32_t m_repetitions = 0; |
| 28 | uint32_t m_calls = 0; |