Nikolai Pretzell wrote:
workaround when keeping the warnings
====================================
The warnings can be work-arounded by declaring copy-constructor and
assignment-operator explicitely private in every derived or containing
class like this:
class C : public Bcd
{public:
C() {}
private:
// Avoid copying:
C(const C&); // declared but not implemented
C & operator=(const C&); // ...
};
This is a possible workaround which ...
positively: makes it immediately visible that this class is not to copy
negatively1: annihilates the boost idiom of deriving from class noncopyable
(see http://www.boost.org/libs/utility/utility.htm#Class_noncopyable)
negatively2: is much more writing work and not clearer than the boost
solution - see here:
class C : public boost::noncopyable
C() {}
};
Ok, here I choose a bad example, because the class C has not the same
semantics anymore (is no longer derived from Bcd).
Nevertheless, these warnings make the use of the boost idiom impossible
and transfer the need to explicitley declare two non implemented
functions in all derived on containing classes.
Nikolai
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]