[vtkusers] vtkSmartPointer

Artem Babayan artem.paraview at googlemail.com
Tue May 11 06:11:36 EDT 2010


Hello,

Why does simple statement:

vtkSmartPointer<vtkDataSet> test(vtkSmartPointer<vtkStructuredPoints>::New());

does not compile with the following error:

<..>/vtkSmartPointer.h: In constructor
`vtkSmartPointer<T>::vtkSmartPointer(const vtkSmartPointer<U>&) [with
U = vtkStructuredPoints, T = vtkview::vtkDataSet]':
../VSSet3dScalarVolumeViewer.cpp:59:   instantiated from here
<..>/vtkSmartPointer.h:43: no matching function for call to
`vtkSmartPointer<vtkview::vtkDataSet>::CheckType(vtkStructuredPoints*)'
<..>/vtkSmartPointer.h:28: candidates are: static T*
vtkSmartPointer<T>::CheckType(T*) [with T = vtkview::vtkDataSet]

vtkStructurePoints are inherited (ultimately) from vtkDataSet isn't it?

I included vtkStructurePoints.h, vtkDataSet.h, vtkStructuredPoints.h
and (just in case) vtkImageData.h to the test program, so inheritance
tree should be known at this point.

Best wishes
Artem



More information about the vtkusers mailing list