Article ID: 139458
Article Last Modified on 7/30/2001
// Compile option needed: none
template<class T> class Outer {
public:
class Inner {
public:
static T sobj;
static T smfunc(T arg);
};
};
//Initialize nested class static object
template <class T> T Outer<T>::Inner::sobj = T();
// Out-of-line definition of nested class static member function
// Moving this definition inside class resolves the error
template <class T> T Outer<T>::Inner::smfunc(T arg)
{
return arg + sobj;
}
Additional query words: kbVC400bug 10.00 10.10 10.20
Keywords: kbbug kbfix kblangcpp kbvc500fix KB139458