Use C++17 fold expression in accumulate_static.hh
In accumulate_static.hh
is a comment
(we do not use c++17 fold expressions because gcc-7 fails to deduce the lambdas types here).
GCC 9 is the oldest version of GCC we still support. We should be able to make this piece of code more readable by using C++17 fold expressions.