gcc/testsuite/g++.dg/cpp0x/nsdmi-template26.C
raw| 1 | // PR c++/109506 |
| 2 | // { dg-do link { target c++11 } } |
| 3 | // { dg-additional-options "-fchecking=2" } |
| 4 | |
| 5 | template<class T> |
| 6 | struct foo { |
| 7 | foo() { }; |
| 8 | }; |
| 9 | |
| 10 | template<class T> |
| 11 | class bar { |
| 12 | foo<int> alloc_{}; |
| 13 | }; |
| 14 | |
| 15 | template<class T> |
| 16 | bar<int> func1() { |
| 17 | return bar<int>{}; |
| 18 | } |
| 19 | |
| 20 | int main() { |
| 21 | func1<int>(); |
| 22 | } |