General: Fix compilation for GCC
This commit is contained in:
parent
fd7afda1e8
commit
afab6c143c
16 changed files with 56 additions and 42 deletions
|
@ -27,7 +27,7 @@ template <class ForwardIt, class T, class Compare = std::less<>>
|
|||
template <typename T, typename Func, typename... Args>
|
||||
T FoldRight(T initial_value, Func&& func, Args&&... args) {
|
||||
T value{initial_value};
|
||||
const auto high_func = [&value, &func]<typename T>(T x) { value = func(value, x); };
|
||||
const auto high_func = [&value, &func]<typename U>(U x) { value = func(value, x); };
|
||||
(std::invoke(high_func, std::forward<Args>(args)), ...);
|
||||
return value;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue