In the following answer, @Incomputable basically dared me to implement a generalization of std::minmax_element, so I'm happy to oblige: #include <array> template<typename IteT, typename... PredsT> auto multi_searc_elements(IteT begin, IteT end, PredsT const&... preds) { const std::size_t count = sizeof...(PredsT); std::array<IteT, count&g…