6 ms·Obviously, you have to use std::accumulate(v.cbegin(), v.cend(), decltype(*v.cbegin()){}); :) :) :)by a_t48 2y agoObviously, you have to use std::accumulate(v.cbegin(), v.cend(), decltype(*v.cbegin()){}); :) :) :)