gcc/testsuite/g++.dg/template/spec9.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | // Origin: Lynn Akers <[email protected]> |
| 4 | // Wolfgang Bangerth <[email protected]> |
| 5 | |
| 6 | // PR c++/10956: Incorrect template substitution for member template |
| 7 | // specialization inside template class. |
| 8 | |
| 9 | template <int> struct C { |
| 10 | template<typename T> void pre_add(T); |
| 11 | }; |
| 12 | |
| 13 | template<> |
| 14 | template<typename T> |
| 15 | void C<32>::pre_add(T) { |
| 16 | T pre; |
| 17 | } |
| 18 | |
| 19 | int main() { |
| 20 | C<32>().pre_add<int>(1); |
| 21 | } |