Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
sumpolicy3.hpp
Go to the documentation of this file.
1 #pragma once
2 
8 template <bool use_compound_op = true>
9 class SumPolicy
10 {
11 public:
12  template <typename T1, typename T2>
13  static void accumulate(T1& total, const T2& value)
14  {
15  total += value;
16  }
17 };
18 
19 template <>
20 class SumPolicy<false>
21 {
22 public:
23  template <typename T1, typename T2>
24  static void accumulate(T1& total, const T2& value)
25  {
26  total = total + value;
27  }
28 };
static void accumulate(T1 &total, const T2 &value)
Definition: sumpolicy3.hpp:24
static void accumulate(T1 &total, const T2 &value)
Definition: sumpolicy3.hpp:13