LibreOffice Module onlineupdate (master) 1
mozilla::MakeSigned< T > Struct Template Reference

MakeSigned produces the corresponding signed integer type for a given integral type T, with the const/volatile qualifiers of T. More...

#include <TypeTraits.h>

Inheritance diagram for mozilla::MakeSigned< T >:
[legend]
Collaboration diagram for mozilla::MakeSigned< T >:
[legend]

Detailed Description

template<typename T>
struct mozilla::MakeSigned< T >

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.


The documentation for this struct was generated from the following file: