I just want to point that even the following code compiles correctly:Quote:
Originally Posted by laserlight
Code:template <class T>
typename bst<T>::sNode* bst<T>::insert(sNode *node, T &data) {
Printable View
I just want to point that even the following code compiles correctly:Quote:
Originally Posted by laserlight
Code:template <class T>
typename bst<T>::sNode* bst<T>::insert(sNode *node, T &data) {
I think Visual Studio is good at ignoring the typename (or not requiring) keyword. However, that doesn't mean it's right. The standard says to use it.
Thanks.
Infact I was wondering if the compiler was just ignoring that.
anyway I'm using g++ ;P
Actually, that's not a case of omitting the typename keyword, but of omitting the containing type within the scope of this type, which is perfectly valid and portable.