Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
accum3.hpp
Go to the documentation of this file.
1 #pragma once
2 
8 #include "accumtraits3.hpp"
9 
10 template <typename T>
11 inline typename AccumulationTraits<T>::type accum(T const* beg, T const* end)
12 {
13  using AccT = typename AccumulationTraits<T>::type;
14 
15  AccT total = AccumulationTraits<T>::value;
16  while (beg != end) {
17  total += *beg;
18  ++beg;
19  }
20  return total;
21 }
AccumulationTraits< T >::type accum(T const *beg, T const *end)
Definition: accum3.hpp:11