[vtk-developers] Add GetModifiedTime deprecate GetMTime
Sean McBride
sean at rogue-research.com
Fri Aug 5 16:40:55 EDT 2016
On Fri, 5 Aug 2016 16:16:09 -0400, Brad King said:
>On 08/05/16 16:10, Sean McBride wrote:
>> You mean to change vtkTypeUInt64 to become 'unsigned long' instead
>> of 'unsigned long long' (in the case where they are both 64 bit,
>> that is, on UNIX)? Isn't that risky too? Isn't C++ very picky
>> about types? Can't one have function/method overload differing
>> only by type, ie:
>>
>> int foo(long a);
>> int foo(long long a);
>>
>> so someone might have;
>>
>> int foo(long a);
>> int foo(vtkTypeInt64 a);
>>
>> then your change would break that. Not all that likely, but,
>> I dunno... I wouldn't change vtkTypeUInt64 like that...
>> (what I would do (one day) is redefine all those in terms of
>> the C++11 fixed sized types, but that's another topic).
>
>Yes, and IO/SQL/vtkSQLQuery.h has such a case.
If VTK itself made this mistake, then so could other code.
>All such overloading
>cases are buggy. When trying to enumerate all supported types one
>should use only the fundamental type names. Using the typedefs is
>buggy because we make no guarantee about what type will be selected.
Agreed, but still. I'm not convinced it's a good tradeoff. But if it's decided to change the definition of vtkTypeUInt64, then maybe now is the time to have a case like:
#if __cplusplus >= c++11
typedef std::uint64_t vtkTypeUInt64;
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtk-developers
mailing list