[vtk-developers] VTK and 'long long'

David Thompson david.thompson at kitware.com
Fri Feb 7 16:17:26 EST 2014


Hi Sean,

> What's the situation with 'long long' in VTK?  Although technically only added in C++11, it's been widely supported as an extension in most compilers long before that.
> 
> Can 'long long' be used unconditionally these days?  (Just like we now assume 'bool' is supported.)  Or does one of our still-supported compilers still not have it?
> 

You can use long long freely. However, be aware that on some (very) old platforms it may be a 4-byte/32-bit integer (at least some Windows compilers). If you really want an 8-byte/64-bit integer, you should use vtkTypeInt64 which is typedef'd to the proper system type. I don't think there are any conditions you need to check in order to use vtkTypeInt64 (that is: all systems that VTK builds on support 64-bit integers... just some of them do not use a standard typename).

	David


More information about the vtk-developers mailing list