[vtk-developers] smart pointer & type checking
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Wed Mar 19 08:56:59 EDT 2008
Because of this:
class vtkSmartPointerBase
{
...
vtkSmartPointerBase& operator=(const vtkSmartPointerBase& r);
...
}
May be this operator should be defined in the subclass to avoid such a
behaviour.
Utkarsh
Shead, Timothy wrote:
> On 3/18/08 3:56 PM, "clinton at elemtech.com" <clinton at elemtech.com> wrote:
>
>>
>> So why does this even compile? I'd prefer to get a compile error.
>>
>> vtkSmartPointer<vtkPolyData> MyPolyData =
>> vtkSmartPointer<vtkMultiBlockDataSet>::New();
>
> Amazingly spooky ... I just got bitten by this a few minutes ago! Not only
> is it not a compile error, it isn't a runtime error either ...
>
> Cheers,
> Tim
>
> --
> Timothy M. Shead
> Sandia National Laboratories
> Scalable Analytics & Visualization
> 505-284-0139
>
>
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
More information about the vtk-developers
mailing list