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

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

#include <TypeTraits.h>

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

Detailed Description

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

MakeUnsigned produces the corresponding unsigned 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 an unsigned integer type (not including char!), then T is produced.

Otherwise, if T is a signed integer type, the unsigned variety of T, with T's const/volatile qualifiers, is produced.

Otherwise, the unsigned 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 unsigned char when T = char.)

mozilla::MakeUnsigned<signed long>::Type is unsigned long; mozilla::MakeUnsigned<volatile unsigned int>::Type is volatile unsigned int; mozilla::MakeUnsigned<const signed short>::Type is const unsigned short; mozilla::MakeUnsigned<const char>::Type is const unsigned char; mozilla::MakeUnsigned<bool> is an error; mozilla::MakeUnsigned<void*> is an error.

Definition at line 992 of file TypeTraits.h.


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