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/] [variadic69.C] - Rev 307
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-options "-std=gnu++0x" }
template<typename T>
struct stored_value
{
explicit stored_value() : value() { }
explicit stored_value(const T& value) : value(value) { }
stored_value(int, const T& value) : value(value) { }
T value;
};
template<typename... Values>
struct myclass : public stored_value<Values>...
{
myclass() { }
explicit myclass(const Values&... values)
: stored_value<Values>(values)... { }
explicit myclass(int x, const Values&... values)
: stored_value<Values>(x, values)... { }
};
void f()
{
int i;
float f;
myclass<int*, float*> ifp1;
myclass<int*, float*> ifp2(&i, &f);
myclass<int*, float*> ifp3(1, &i, &f);
}
Go to most recent revision | Compare with Previous | Blame | View Log