gcc/testsuite/g++.dg/template/spec11.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | // Origin: [email protected] |
| 4 | |
| 5 | // PR c++/13635: ICE explicit specialization of member function template |
| 6 | |
| 7 | template <class foo> |
| 8 | class bar { |
| 9 | public: |
| 10 | template <class baz> |
| 11 | int func(baz *x); |
| 12 | }; |
| 13 | |
| 14 | template <> |
| 15 | template <class baz> |
| 16 | int bar<double>::func(baz *x) { return 5;} |
| 17 | |
| 18 | template <> |
| 19 | template <> |
| 20 | int bar<double>::func(int *x) { return 5;} |