So, I still understand the semantics of C ++ references.
I have a class that has a link as a member, and I initialize the link in the constructor.
template<class T> class AVLNode { private: T & data; public: AVLNode(T & newData) { data = newData; } };
But I get this error in the constructor line:
error: uninitialized reference member 'AVLNode<int>::data' [-fpermissive]
I do not get this, I initialize the link as soon as the class is built, so there should be no problem with uninitializing the link correctly?
source share