[vtk-developers] const correctness
Bill Lorensen
bill.lorensen at gmail.com
Thu Feb 10 15:16:08 EST 2011
ITK has used mutable for years. Even Borland and VS6 supported it
(although ITK has dropped them for other reasons).
On Thu, Feb 10, 2011 at 3:13 PM, David Partyka
<david.partyka at kitware.com> wrote:
> Which compiler out of curiosity? VS 7.1?
>
> 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
>>
>
>
> _______________________________________________
> 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