gcc/testsuite/g++.dg/modules/dguide-1_b.C
raw| 1 | // PR c++/115231 |
| 2 | // { dg-additional-options "-fmodules-ts" } |
| 3 | |
| 4 | import M; |
| 5 | |
| 6 | int main() { |
| 7 | // Check that deduction guides are reachable, |
| 8 | // and that they declared the right type. |
| 9 | A a(1); |
| 10 | A<int> a2 = a; |
| 11 | |
| 12 | B b(2); |
| 13 | B<double> b2 = b; |
| 14 | |
| 15 | C<int>::I x(10); |
| 16 | C<int>::I<int> x2 = x; |
| 17 | |
| 18 | C<int>::I y("xyz"); |
| 19 | C<int>::I<char> y2 = y; |
| 20 | } |