Tracks the index as the loop runs rather than searching afterwards.
Variables | |
| constexpr auto | eve::algo::single_pass = ::rbr::flag(single_pass_tag {}) |
|
inlineconstexpr |
#include <eve/module/algo.hpp>Makes a search track the index of its candidate as the loop runs, rather than search for it afterwards. By default eve::algo::min_element and eve::algo::max_element are two passes, the value then its position, which is faster on eve's benchmarks; the trait is for a body that is expensive enough for a second pass to cost more than the tracking.