gcc/testsuite/g++.dg/diagnostic/using1.C
raw| 1 | // PR c++/102987 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | struct a { |
| 5 | bool b(); |
| 6 | }; |
| 7 | template <typename c> struct d : c { |
| 8 | using c::e; |
| 9 | using f = d; |
| 10 | // { dg-message "decltype .c::e" "" { target *-*-* } 0 } |
| 11 | constexpr int g(decltype(e.b())) { return buh; } // { dg-error "buh" } |
| 12 | }; |
| 13 | struct h { |
| 14 | a e; |
| 15 | }; |
| 16 | using i = d<h>; |
| 17 | auto j = i{}.g(1); |