Debian Codegraph @

gcc/testsuite/g++.dg/template/spec10.C

raw
1 // { dg-do run }
2
3 // Origin: Lynn Akers <[email protected]>
4
5 // PR c++/10940: Problem handling parameter list for static member
6 // that is a specialization of a member template of a template class.
7
8 template<int b>
9 class o
10 {
11 public:
12 template<typename T> static void do_add(T* p, T v);
13 };
14
15 template<>
16 template<typename T>
17 inline void o<32>::do_add(T* p, T v)
18 {
19 *p += v;
20 }
21
22 int main()
23 {
24 int a = 0x1000;
25 o<32>().do_add<int>(&a, 0x2000);
26 return (a != 0x3000);
27 }