<div dir="ltr">Changed the document, Robert please revise as you see fit.</div><div class="gmail_extra"><br clear="all"><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>

Phone: 518-881-4909</div>
<br><br><div class="gmail_quote">On Wed, Jul 24, 2013 at 11:06 AM, Robert Maynard <span dir="ltr"><<a href="mailto:robert.maynard@kitware.com" target="_blank">robert.maynard@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

The VTK coding standards should be amended to state that those rules<br>
are only valid for classes that derive from vtkObject.<br>
<br>
Classes like vtkBond, vtkTuple, vtkBoundingBox all which don't inherit<br>
from vtkObject should follow the rule of three and implement the copy<br>
and assignment constructor if they implement a destructor.<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Jul 24, 2013 at 10:50 AM, Sean McBride <<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>> wrote:<br>
> Hi all,<br>
><br>
> So I'm looking at the clang warnings on Rogue7, but need C++ help before I can proceed further.  We have two similar warnings, repeated for several classes:<br>
><br>
> VTK/Common/DataModel/vtkBond.h:30:3: warning: definition of implicit copy constructor for 'vtkBond' is deprecated because it has a user-declared destructor [-Wdeprecated]<br>
>   ~vtkBond();<br>
>   ^<br>
><br>
> VTK/Common/Math/vtkQuaternion.h:201:8: warning: definition of implicit copy constructor for 'vtkQuaternion<float>' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated]<br>


>   void operator=(const vtkQuaternion<T>& q);<br>
>        ^<br>
><br>
> From what I can tell, in C++11, the implicit generation of copy constructors is now deprecated if 1) you provide a user-declared destructor or 2) you provide a user-declared copy assignment operator.<br>
> <<a href="http://stackoverflow.com/a/11255258" target="_blank">http://stackoverflow.com/a/11255258</a>><br>
><br>
> So it would seem a solution is to provide an explicit copy constructor, but VTK's coding standards gives me pause: "Classes should have protected constructors and destructors, and privately declared but unimplemented copy constructor and assignment operator. Rationale: VTK’s reference counting implementation depends on carefully controlling each object’s reference count".<br>


><br>
> So now I'm not sure how to proceed...<br>
><br>
> Thanks,<br>
><br>
> --<br>
> ____________________________________________________________<br>
> Sean McBride, B. Eng                 <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
> Rogue Research                        <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
> Mac Software Developer              Montréal, Québec, Canada<br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br></div>