Hi I am developing a library in which I need to use definite size types across all compilers and versions of C++. These would be similar to microsoft's __int32 and similar types. I also need a portable equivalent for __m128 (the SIMD 4 float vector data type). I need types for one byte and 32 bit and 64 bit floating point values.
I don't know about microsoft, but in current C++, we have
std::int32_t (equivalent to C's int32_t, the signed 32-bit integer)
std::uint8_t (equivalent to C's uint8_t, the unsigned 8-bit integer, typically an alias of unsignedchar)
float, the 32-bit floating-point number (except where std::numeric_limits<float>::is_iec559 == false, if C++ compilers for such platforms exist)
double, the 64-bit floating point number (except where std::numeric_limits<double>::is_iec559 == false, if C++ compilers for such platforms exist)
As for the 128-bit SSE type, it's not so simple: it's not just a 4-float vector, it needs to be aligned to the 16-byte boundary. In C and C++, this can be done as structalignas(16) m128 { float data[4]; };, but not many compilers supports alignas yet -- you're likely going to have to use compiler-specific code, such as declspec(align(16)) or __attribute ((aligned (16)))