
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 06 September 2008 15:10 pm, Igor R wrote:
TextTool::TextTool(QDialog *taskDialogue) : Tool(this->name) { boost::shared_ptr<TextTool> pointerToThis = TextTool::shared_from_this(); //ERROR OCCURS ON THIS LINE
bold = boost::shared_ptr<ToggleControl>(new ToggleControl(pointerToThis)); }
You cannot call shared_from_this in the constructor. Instead, you can define a static constructing method, like this:
Actually, you can use shared_from_this with the boost from svn trunk. I don't know when/if this feature will make it into a release though. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIxSLy5vihyNWuA4URAtZ2AJ4vrARqO6k15uk8wskm5ml4MDURsQCgiIaY 0KZx8D/jKW75e71dkazGLnY= =rqYm -----END PGP SIGNATURE-----