Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/variadic114.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 // PR c++/49785 | |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 template <typename, typename ...> struct B { }; | |
5 template <typename> class A; | |
6 | |
7 template <typename R, typename ... S> | |
8 struct A <R (S ...)> : public B <R, S ...> | |
9 { | |
10 struct C {}; | |
11 template <typename D> A (D, C = C ()) { } | |
12 R operator () (...); | |
13 }; | |
14 | |
15 template <typename R, typename ... S, typename T> | |
16 auto operator >> (A <R (S ...)>, T)->A <R (S ...)> | |
17 { | |
18 []() {}; | |
19 } | |
20 | |
21 int | |
22 main () | |
23 { | |
24 A <int (int, int)> a = [](int, int) {}; | |
25 auto b = []{}; | |
26 (a >> b) (3, 5); | |
27 } |