On Aug 22, 4:27 pm, Seweryn Habdank-Wojewódzki <[EMAIL PROTECTED]>
wrote:
> Hi
>
> Can any one explain me why is I am using boost::noncopyable then Weffc+
> + displays my warning e.g.:
>
> roadsim.cpp:37: warning: 'class road::detail::RoadSimImpl' has pointer
> data members
> roadsim.cpp:37: warning:   but does not override
> 'road::detail::RoadSimImpl(const road::detail::RoadSimImpl&)'
> roadsim.cpp:37: warning:   or 'operator=(const
> road::detail::RoadSimImpl&)'
>
> It means that boost::noncopyable do not works or what?

No; 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.

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. For this kind
of classes you must define what "copying" means, to deal with the
"shared resource" problem.

--
 Pedro Lamarão

_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to