I am trying to instantiate a template externaly however I would like o use a typedef in the instantiation clause. I think the example says more than thousand words:
typedef myTemplate_base<commonValue> myTemplate; //in 99% of the cases I use this so I want a shorthand
extern template class myTemplate; //wont work/compiler error class infront of typedef
I get the same error if I try to actually instantiate the template like this:
template class myTemplate;
I know I can write (extern) template class myTemplate_base<commonValue> instead, however I think this is uglier, since I need to adjust my common Value in 3 places instead of one.
So how do I have to put this, to use the typedef in the extern declaration/instantiation?
I am ussing gcc 4.6.1 on Ubunutu
typedef-name cannot be used in explicit instantiation.
From 14.7.2/3