]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.dg/cpp0x/variadic69.C
PR c++/92590 - wrong handling of inherited default ctor.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / variadic69.C
CommitLineData
4b2e63de 1// { dg-do compile { target c++11 } }
d6a85c8d
DG
2template<typename T>
3struct stored_value
4{
5 explicit stored_value() : value() { }
6
7 explicit stored_value(const T& value) : value(value) { }
8
9 stored_value(int, const T& value) : value(value) { }
10
11 T value;
12};
13
14template<typename... Values>
15struct myclass : public stored_value<Values>...
16{
17 myclass() { }
18
19 explicit myclass(const Values&... values)
20 : stored_value<Values>(values)... { }
21
22 explicit myclass(int x, const Values&... values)
23 : stored_value<Values>(x, values)... { }
24
25};
26
27void f()
28{
29 int i;
30 float f;
31 myclass<int*, float*> ifp1;
32 myclass<int*, float*> ifp2(&i, &f);
33 myclass<int*, float*> ifp3(1, &i, &f);
34}
This page took 7.778538 seconds and 5 git commands to generate.