Skip to content
Snippets Groups Projects
Commit 945dddcd authored by Timo Koch's avatar Timo Koch
Browse files

[hybrid] Make accumulate constexpr

parent 8f5d4112
No related branches found
No related tags found
1 merge request!795Make Dune::Hybrid::accumulate to be usable in constexpr context
Pipeline #26161 passed
......@@ -287,7 +287,7 @@ constexpr void forEach(Range&& range, F&& f)
* This supports looping over the same ranges as Hybrid::forEach
*/
template<class Range, class T, class F>
T accumulate(Range&& range, T value, F&& f)
constexpr T accumulate(Range&& range, T value, F&& f)
{
forEach(std::forward<Range>(range), [&](auto&& entry) {
value = f(value, entry);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment