gcc/testsuite/g++.dg/modules/internal-14_a.C
raw| 1 | // PR c++/120412 |
| 2 | // { dg-additional-options "-fmodules -std=c++20 -Wtemplate-names-tu-local" } |
| 3 | // { dg-module-cmi m:part } |
| 4 | |
| 5 | export module m:part; |
| 6 | |
| 7 | export template <typename F> |
| 8 | auto fun1(F) { |
| 9 | return true; |
| 10 | } |
| 11 | |
| 12 | using Dodgy = decltype([]{}); |
| 13 | |
| 14 | export template <typename T> |
| 15 | auto fun2(T&&) { // { dg-warning "TU-local" } |
| 16 | return fun1(Dodgy{}); |
| 17 | } |