MCPcopy Create free account
hub / github.com/ShivaBhattacharjee/KeyZen / sum

Function sum

data/cpp/01_templates.cpp:12–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11template <typename T>
12T sum(const std::vector<T>& v) {
13 T total = T{};
14 for (const auto& x : v) total += x;
15 return total;
16}
17
18template <typename T, typename U>
19struct Pair {

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected