gcc/testsuite/g++.dg/warn/Wunused-local-typedefs-2.C
raw| 1 | // Origin PR c++/33255 |
| 2 | // { dg-options "-Wunused" } <-- should trigger -Wunused-local-typedefs |
| 3 | // { dg-do compile { target c++11 } } |
| 4 | |
| 5 | template <typename C> |
| 6 | struct structure |
| 7 | { |
| 8 | typename C::type val; |
| 9 | }; |
| 10 | |
| 11 | int |
| 12 | main() |
| 13 | { |
| 14 | struct context |
| 15 | { |
| 16 | using type = int; |
| 17 | }; |
| 18 | |
| 19 | return structure<context>{42}.val; |
| 20 | } |