On Fri, 2008-05-09 at 20:01 +0200, Mathias Bauer wrote:
> Another interesting discovery was that removing ctors can be dangerous
> at times because some compilers automatically create default or copy
> ctors for classes even if they aren't used.

One technique to work around this is to put the default and copy ctors
in the private section of the class declaration, and leave their
definitions out.  That should prevent the compiler from automatically
generating those ctors, and if any code constructs that class via
default or copy constructor, then the link should fail.

-- 
Kohei Yoshida - OpenOffice.org Engineer - Novell, Inc.
<[EMAIL PROTECTED]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to