]>
Commit | Line | Data |
---|---|---|
26963cc3 RL |
1 | struct test_box |
2 | { | |
3d9bd4e3 | 3 | void print(void); |
26963cc3 RL |
4 | }; |
5 | ||
3d9bd4e3 | 6 | void test<class BOX> (test_box *); // ERROR - illegal code |
26963cc3 RL |
7 | |
8 | class test_square | |
9 | { | |
36a117a5 | 10 | friend void test<class BOX> (test_box *); // ERROR - does not match |
26963cc3 RL |
11 | } |
12 | ||
13 | ||
14 | ||
3d9bd4e3 | 15 | template <class BOX> void test(BOX *the_box) // ERROR - semicolon missing |
26963cc3 RL |
16 | { |
17 | the_box->print(); | |
18 | }; | |
19 | ||
3d9bd4e3 | 20 | template void test<> (test_box *); // gets bogus error - test is declared XFAIL *-*-* |
26963cc3 | 21 |