accumulate(begin(v), end(v), value_type{0});
Suggesting 0LL is just calling for trouble when someone realizes the vector didn't had to be long long and forgets to change the initialized value. for(auto i = 0; i < vec.size(); ...) {...}
since i and size() have different types. The worst part is that unsigned doesn't buy you that much (only twice as many elements). using Idx = long long;
accumulate(begin, end, Idx{0});
when I'm hacking, and struct unique_tag {};
using Idx = arithmetic_type<long long, unique_tag>;
when I'm serious to disable all implicit conversions and make these types of errors impossible.
lol, no, god no. I think you got the STL completely wrong.