[vtk-developers] Plan to make CMake 3.3 and C++11 required

Marcus D. Hanwell marcus.hanwell at kitware.com
Tue Jan 17 22:53:11 EST 2017


On Tue, Jan 17, 2017 at 4:21 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> On Tue, Jan 17, 2017 at 1:58 PM, Marcus D. Hanwell
> <marcus.hanwell at kitware.com> wrote:
>>
>> That is already the case, and I have modernized some classes. You can
>> use vtkNew and vtkSmartPointer in class declarations, and we went to
>> some effort to ensure they could be forward declared.
>
> Well, then, there's a whole lot of egg on my face.  I guess that since
> most of the classes that I maintain predated this, I never noticed that
> the newer classes were using smart pointers like this, hence I assumed
> that it wasn't possible.  Because in my mind, I just couldn't image that
> such an important bit of code hygiene would be possible and at the
> same time not be used throughout VTK.
>
Glad I could clear it up, and I agree we should be using this far more
widely. It is hard to automate though, and takes a fair bit of
development time. I tend to spend more time on end user applications
in recent years too. I wonder if we should make vtkNew automatically
return its pointer as vtkSmartPointer does to encourage its use. I
will see if I can update some more code.


More information about the vtk-developers mailing list