hello i am having the follow problem.
the problem is obviously that there is no cunstructor in A<const T> to accept A<T>.Code:template<typename T> struct A { private: T* t; }; template<typename T> struct B { inline A<T>& GetA() { return a; } inline A<const T>& GetA() const // <<<<<<<< { return a; // <<<<<<<<<< } private: A<T> a; };
i have been brain cracking how to to create the constructor solution.
I was thinking i might as well make a public instead of private.
Any help please?




Reply With Quote