Reputation: 23
template <typename T>
class School{
public:
class Student{
public:
Student & operator++();
Student operator++(int);
}
}
Assuming I have this in my header file, how would I use the scope resolution operator to for an hpp file? I have tried this but the result were an expected initializer before & token
template <class T>
T School<T> :: Student& Student:: operator++()
{
}
Upvotes: 2
Views: 139
Reputation: 118445
One more, for the win (with a pinch-hit from typename
):
template <class T>
typename School<T>::Student &School<T>::Student::operator++()
{
return *this;
}
Upvotes: 3