[vtk-developers] const correctness

David Thompson dcthomp at sandia.gov
Thu Feb 10 15:08:02 EST 2011


> Also, const-correctness can be difficult in situations where some  
> tasks appear to be const but in fact are not, leading to  
> difficulties when you need to use them inside another const  
> function. For example, vtkPointLocator::FindClosestPoint() seems  
> like it should be const but in fact it may need to rebuild the  
> bucket structure used to accelerate the search.
>
> -> This is why there is the "mutable" keyword in C++.

I was under the impression that at least one compiler VTK supported  
didn't handle it, but that may have changed when some of the compilers  
were dropped a while back.

	David





More information about the vtk-developers mailing list