From 07fcb3b032526e76086d7f75dad01b867233b5d5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 13 Aug 2009 14:59:40 +0200 Subject: Add QIntegerForSize<1> and QIntegerForSize<2>. Undocumented, but maybe they're useful somewhere. It doesn't hurt to add them. --- src/corelib/global/qglobal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 7076a1e..5a2c329 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -848,6 +848,8 @@ typedef quint64 qulonglong; && sizeof(void *) == sizeof(qptrdiff) */ template struct QIntegerForSize; +template <> struct QIntegerForSize<1> { typedef quint8 Unsigned; typedef qint8 Signed; }; +template <> struct QIntegerForSize<2> { typedef quint16 Unsigned; typedef qint16 Signed; }; template <> struct QIntegerForSize<4> { typedef quint32 Unsigned; typedef qint32 Signed; }; template <> struct QIntegerForSize<8> { typedef quint64 Unsigned; typedef qint64 Signed; }; template struct QIntegerForSizeof: QIntegerForSize { }; -- cgit v0.12