Environment: Microsoft Visual Studio 2010
Coding standard: C++0x compatible
I have a class template
template <typename T1, int I>
class A
{
public template <typename T2> void f(T2 x);
/*...*/
};
template <typename T1, int I>
template <typename T2>
void A<T1, I>::f(T2 x)
{
/*...*/
}
and partial specialization of above class
template <int I>
class A<char, I>
{
public template <typename T2> void f(T2 x);
/*...*/
};
Then can I specialize member function in the partially specialized class like below?
template <int I>
template <>
void A<char, I>::f<double>(double x)
{
}
Thanks!
NB: I'm not working on it but thinking if it's applicable or not. Easy rating if you know about the rule.
public void? Did you actually try to compile this? - Pubby