[vtk-developers] const correctness
David Thompson
dcthomp at sandia.gov
Thu Feb 10 15:55:23 EST 2011
Hi Dave,
> Which compiler out of curiosity? VS 7.1?
I didn't recall, but after some googling, it appears it VS6 may have
had a bug in its support. There is also a small bug in VS7.1 with
"const mutable" sometimes being accepted as a template parameter, but
that shouldn't be a problem for VTK.
David
> On Thu, Feb 10, 2011 at 3:08 PM, David Thompson <dcthomp at sandia.gov>
> wrote:
> 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
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
More information about the vtk-developers
mailing list