Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
accum1.hpp
Go to the documentation of this file.
1 #pragma once
2 
8 template <typename T>
9 inline T accum(T const* beg, T const* end)
10 {
11  T total = T(); // assume T() actually creates a zero value
12  while (beg != end) {
13  total += *beg;
14  ++beg;
15  }
16  return total;
17 }
T accum(T const *beg, T const *end)
Definition: accum1.hpp:9