Merge "Fix assert on saving settings"
[trojita.git] / cmake / FindCXXFeatures / cxx11-test-variadic_templates.cxx
blob4518e886fd188a51fa8e8c2eef3216566f8481f3
1 int Accumulate()
3 return 0;
6 template<typename T, typename... Ts>
7 int Accumulate(T v, Ts... vs)
9 return v + Accumulate(vs...);
12 template<int... Is>
13 int CountElements()
15 return sizeof...(Is);
18 int main()
20 int acc = Accumulate(1, 2, 3, 4, -5);
21 int count = CountElements<1,2,3,4,5>();
22 return ((acc == 5) && (count == 5)) ? 0 : 1;