Hi,
I'm passing a reference to an object to another object which is hold by composition like this:
and I'm getting the following warning, which was never apparent to me before (while using composition regulary):Code:class A; class B : boost::noncopyable { A& mParent; public: B(A& parent) :mParent(parent) {} }; class A : boost::noncopyable { B mB; public: A() // warning :mB(*this) {} }; int main() {}
What I'm doing wrong this monday?warning C4355: 'this' : used in base member initializer list
THank you in advance!