LibreOffice Module onlineupdate (master) 1
|
MakeSigned produces the corresponding signed integer type for a given integral type T, with the const/volatile qualifiers of T. More...
#include <TypeTraits.h>
MakeSigned produces the corresponding signed integer type for a given integral type T, with the const/volatile qualifiers of T.
T must be a possibly-const/volatile-qualified integral type that isn't bool.
If T is already a signed integer type (not including char!), then T is produced.
Otherwise, if T is an unsigned integer type, the signed variety of T, with T's const/volatile qualifiers, is produced.
Otherwise, the integral type of the same size as T, with the lowest rank, with T's const/volatile qualifiers, is produced. (This basically only acts to produce signed char when T = char.)
mozilla::MakeSigned<unsigned long>::Type is signed long; mozilla::MakeSigned<volatile int>::Type is volatile int; mozilla::MakeSigned<const unsigned short>::Type is const signed short; mozilla::MakeSigned<const char>::Type is const signed char; mozilla::MakeSigned<bool> is an error; mozilla::MakeSigned<void*> is an error.
Definition at line 923 of file TypeTraits.h.