URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [variadic68.C] - Rev 301
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;
}