<p dir="ltr">Den 27 juni 2017 1:34 fm skrev "Andras Lasso" <<a href="mailto:lasso@queensu.ca">lasso@queensu.ca</a>>:<br>
><br>
> Thanks for all the comments on this topic. I've updated the pull request (squashed commits, included main points from the discussions):</p>
<p dir="ltr">Thanks a lot for taking care of this.</p>
<p dir="ltr">Now, my original post was about the examples. Those will naturally not be updated to take care of this brand new functionality, since they need to work with older VTKs.</p>
<p dir="ltr">However, regarding the auto keyword for declarations (but keeping the use of vtkSmartPointer intact): The objection to that was older compilers, but auto has been supported in all major compilers since 2010.</p>
<p dir="ltr">I'd like to get some more opinions on this. Personally I think compilers lacking auto is so rare that the improved readability of the examples outweigh the inconvenience of those who use old compilers (who will have to adapt the examples).</p>
<p dir="ltr">Should we have a poll on this, like was done for vtkNew implicit conversion?</p>
<p dir="ltr">Elvis</p>
<p dir="ltr">><br>
> <a href="https://gitlab.kitware.com/lassoan/vtk/commit/00bf5f3d3acf655e396feb4d3b7167806aba05b9">https://gitlab.kitware.com/lassoan/vtk/commit/00bf5f3d3acf655e396feb4d3b7167806aba05b9</a><br>
><br>
> Andras<br>
><br>
> -----Original Message-----<br>
> From: vtk-developers [mailto:<a href="mailto:vtk-developers-bounces@vtk.org">vtk-developers-bounces@vtk.org</a>] On Behalf Of Marcus D. Hanwell<br>
> Sent: Monday, June 26, 2017 9:47 PM<br>
> To: David Cole <<a href="mailto:DLRdave@aol.com">DLRdave@aol.com</a>><br>
> Cc: VTK Developers <<a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a>>; Brad King <<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>><br>
> Subject: Re: [vtk-developers] vtkNew in examples (or auto?)<br>
><br>
> On Mon, Jun 26, 2017 at 3:30 PM, David Cole <<a href="mailto:DLRdave@aol.com">DLRdave@aol.com</a>> wrote:<br>
> > I hereby retract my "disastrous" comment from the other email thread<br>
> > on this topic...<br>
> ><br>
> That was quite a thread, it was hidden by a terrible subject that gave me no idea what it was about. I think I was with you, but as vtkObject derived classes are all reference counted, and vtkSmartPointer/vtkNew are effectively the same as far as risk of going out of scope/returning a dangling pointer we should be consistent.<br>
><br>
> I am not a fan of either implicitly converting, but if one does it they both should. I was just being cautious at the time, but I think it was the wrong call, and would prefer consistency. I routinely use vtkSmartPointer and vtkNew in class design to take care of objects, and when switching between the two it is a pain because of the inconsistency.<br>
><br>
> I had been planning to propose this patch for a while, and am glad someone else did. It is a simple change, but it makes using the two far more interchangeable, and will hopefully encourage more people to use our pointer classes to aid with memory management, and banish the smart pointer creation macros littering tests.<br>
> _______________________________________________<br>
> Powered by <a href="https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C02ba850c4d54497c377408d4bccc2f2f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636341032526560231&sdata=8qrELn4ovJgQN7AjOI8E3FDzrU%2FudajhRDLyeUpCoYg%3D&reserved=0">https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C02ba850c4d54497c377408d4bccc2f2f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636341032526560231&sdata=8qrELn4ovJgQN7AjOI8E3FDzrU%2FudajhRDLyeUpCoYg%3D&reserved=0</a><br>
><br>
> Visit other Kitware open-source projects at <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C02ba850c4d54497c377408d4bccc2f2f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636341032526560231&sdata=j%2BaQLKquqzpFouD%2BxG0Mu%2FK7vDiyhWkVy2AcH2y8whE%3D&reserved=0">https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C02ba850c4d54497c377408d4bccc2f2f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636341032526560231&sdata=j%2BaQLKquqzpFouD%2BxG0Mu%2FK7vDiyhWkVy2AcH2y8whE%3D&reserved=0</a><br>
><br>
> Search the list archives at: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtk-developers&data=02%7C01%7Classo%40queensu.ca%7C02ba850c4d54497c377408d4bccc2f2f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636341032526560231&sdata=6XZzGlIeDboJvRDMokX422KvtmCrIltQtXD4vRE20bY%3D&reserved=0">https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtk-developers&data=02%7C01%7Classo%40queensu.ca%7C02ba850c4d54497c377408d4bccc2f2f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636341032526560231&sdata=6XZzGlIeDboJvRDMokX422KvtmCrIltQtXD4vRE20bY%3D&reserved=0</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtk-developers&data=02%7C01%7Classo%40queensu.ca%7C02ba850c4d54497c377408d4bccc2f2f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636341032526560231&sdata=3Mffbxh0OuhI%2FEd83nrkhyOelfKcmG1pq99WstkE1Vw%3D&reserved=0">https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtk-developers&data=02%7C01%7Classo%40queensu.ca%7C02ba850c4d54497c377408d4bccc2f2f%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636341032526560231&sdata=3Mffbxh0OuhI%2FEd83nrkhyOelfKcmG1pq99WstkE1Vw%3D&reserved=0</a><br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers">http://markmail.org/search/?q=vtk-developers</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
></p>