gcc/testsuite/g++.dg/modules/lambda-5_a.C
raw| 1 | // PR c++/105322 |
| 2 | // { dg-module-do link } |
| 3 | // { dg-additional-options -fmodules-ts } |
| 4 | // { dg-module-cmi pr105322.Lambda } |
| 5 | |
| 6 | export module pr105322.Lambda; |
| 7 | |
| 8 | struct A { }; |
| 9 | |
| 10 | export |
| 11 | inline void f1() { |
| 12 | A a; |
| 13 | auto g1 = [a] { }; // used to ICE here during stream out |
| 14 | } |
| 15 | |
| 16 | export |
| 17 | template<class...> |
| 18 | void f2() { |
| 19 | A a; |
| 20 | auto g2 = [a] { }; |
| 21 | } |
| 22 | |
| 23 | export |
| 24 | inline auto g3 = [a=A{}] { }; |