URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [variadic68.C] - Rev 774
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
// { dg-options "-std=gnu++0x" }
extern "C" void abort();
template<typename T, T... Values>
void f(T* expected_values, int n)
{
if (sizeof...(Values) != n)
abort ();
T values[] = { Values... };
for (int i = 0; i < n; ++i)
if (values[i] != expected_values[i])
abort();
}
int main()
{
int test_arr1[3] = { 1, 2, 3 };
f<int, 1, 2, 3>(test_arr1, 3);
return 0;
}
Go to most recent revision | Compare with Previous | Blame | View Log