gcc/testsuite/g++.dg/lookup/using66a.C
raw| 1 | // PR c++/92918 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | struct Base03 |
| 5 | { |
| 6 | static void impl(); |
| 7 | }; |
| 8 | |
| 9 | struct ThisDoesNotCompileOnGCC : Base03 |
| 10 | { |
| 11 | using Base03::impl; |
| 12 | static int impl(char const *); |
| 13 | |
| 14 | auto f(const char *t) const |
| 15 | -> decltype(impl(t)) |
| 16 | { |
| 17 | return impl(t); |
| 18 | } |
| 19 | }; |
| 20 | |
| 21 | ThisDoesNotCompileOnGCC t; |
| 22 | int i = t.f("42"); |