samedi 22 août 2015

State of support for the optional fixed width integer types introduced in C++11

C++11 has finally introduced fixed width integer types in <cstdint>, as documented here: http://ift.tt/1mBbR2X

It is stated that the types int8_t, int16_t, int32_t, int64_t and their unsigned variants are only optionally supported:

(provided only if the implementation directly supports the type)

My question is to which extent these types are supported on current versions of compilers that claim to support C++11 (of MSVC, GCC, MinGW, clang, etc). For example, Visual Studio 2013 and 2015, seem to support all of the types from std::int8_t to std::int64_t including unsigned ones. Is there any common compiler with C++11 support out there that does not support these types (or does it wrong, according to the C++11 spec) - or can these types, for example, be used in a cross-platform library without having to worry?

Aucun commentaire:

Enregistrer un commentaire