gcc/testsuite/g++.dg/template/sizeof2.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | template<int size> |
| 4 | struct Foobar { |
| 5 | // Contents irrelevant |
| 6 | }; |
| 7 | |
| 8 | template <typename A> |
| 9 | struct Wrapper { |
| 10 | // Contents irrelevant |
| 11 | }; |
| 12 | |
| 13 | template <typename A> |
| 14 | Foobar<sizeof(Wrapper<A>)> * |
| 15 | compiler_bug (A) |
| 16 | { |
| 17 | return 0; |
| 18 | } |
| 19 | |
| 20 | int main() |
| 21 | { |
| 22 | compiler_bug(1); |
| 23 | } |