help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: boost::noncopyable and warning: ... override "=" or copy-ctor


From: Pedro Lamarão
Subject: Re: boost::noncopyable and warning: ... override "=" or copy-ctor
Date: Mon, 27 Aug 2007 14:34:54 -0000
User-agent: G2/1.0

On Aug 25, 6:53 pm, Seweryn Habdank-Wojewódzki <habd...@gmail.com>
wrote:
> Hi
>
> > The warning is useful because, if your class holds dynamically
> > allocated resources, the default copy constructor and copy assignment
> > operator generated by the compiler won't be appropriate.
>
> Yes. But noncopyable should define that, isn't it? Means that I do not
> want to copy objects.

"noncopyable" is not a special keyword known by the compiler.
It's just a class with private copy constructor and copy assignment
operator.

You missed my first paragraph:

"(...) assuming you are using boost::noncopyable appropriately, it
means
the diagnostic mechanism is not detecting that, in this case, your
class simply isn't copyable."

--
 Pedro Lamarão



reply via email to

[Prev in Thread] Current Thread [Next in Thread]