gcc/testsuite/g++.dg/cpp0x/pr71054.C
raw| 1 | // PR c++/71054 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | #include <initializer_list> |
| 5 | |
| 6 | template <typename D, typename T = decltype (&D::U)> |
| 7 | struct S |
| 8 | { |
| 9 | struct A |
| 10 | { |
| 11 | int a; |
| 12 | int b; |
| 13 | T p; |
| 14 | }; |
| 15 | S () { std::initializer_list<A> a{ {0, 0, &D::V} }; } |
| 16 | }; |
| 17 | struct R { |
| 18 | void V (int); |
| 19 | void U (int); |
| 20 | }; |
| 21 | S<R> b; |