You do not need to specialize in this. It can store pointers already.
GList<int*> ints;
In any case, if you want to specialize GList for pointers, use the following syntax.
template <class I> class GList<I*> { ... };
Then just use I , as in any regular template. In the above example with GList<int*> , pointer specialization will be used, and I will be int .
source share