[Insight-developers] Platform-independenttypenames and64-bitintegers

Kris Thielemans kris.thielemans at csc.mrc.ac.uk
Thu Jul 7 12:46:51 EDT 2005


> 
> If we use itk::int8_t as just int8_t when inside the itk namespace, 
> will we have any problems when C++ adopts (or compilers 
> provide) an int8_t? 
> 

I believe that you can have both types without conflict (for a decent
compiler). The typedef in the namespace will 'overload' the global type. For
instance, I believe (but didn't check) that you can do

namespace itk {
typedef someclassofmine int;
}

and everywhere in the itk namespace you will have changed int...

> Or do we just drop our inclusion into 
> the itk namespace 
> for those platforms at that time?

You could do that. But to help people who wrote explictly itk::int8_t, you
could do something like

namespace itk {
using ::int8_tt;
}

(which is exactly what is in boost/cstdint.hpp of course)

Kris Thielemans
Hammersmith Imanet, part of GE Healthcare
London W12 ONN, United Kingdom




More information about the Insight-developers mailing list