| 1 |
// PR c++/115231 |
| 2 |
// { dg-additional-options "-fmodules-ts -Wno-global-module" } |
| 3 |
// { dg-module-cmi M } |
| 4 |
|
| 5 |
module; |
| 6 |
|
| 7 |
template <typename T> |
| 8 |
struct A { |
| 9 |
template <typename U> A(U); |
| 10 |
}; |
| 11 |
template <typename T> A(T) -> A<T>; |
| 12 |
|
| 13 |
export module M; |
| 14 |
|
| 15 |
template <typename T> |
| 16 |
struct B { |
| 17 |
template <typename U> B(U); |
| 18 |
}; |
| 19 |
B(int) -> B<int>; |
| 20 |
|
| 21 |
// Accessing deduction guides should be possible, |
| 22 |
// even if we can't name the type directly. |
| 23 |
export A<void> f(); |
| 24 |
export B<void> g(); |