1 // { dg-do compile { target c++11 } }
2 template<template<int, int> class Meta, int Initial, int... Values>
4 static const int value = Initial;
7 template<template<int, int> class Meta, int Initial, int Value, int... Rest>
8 struct accumulate<Meta, Initial, Value, Rest...> {
9 static const int value =
10 Meta<Value, accumulate<Meta, Initial, Rest...>::value>::value;
13 template<int X, int Y>
15 static const int value = X + Y;
18 template<int X, int Y>
20 static const int value = X * Y;
23 int a0[accumulate<sum,0,1,2,3,4,5>::value == 15? 1 : -1];
24 int a1[accumulate<prod,1,1,2,3,4,5>::value == 120? 1 : -1];