• Qt


    <QtGlobal>
     1 typedef signed char qint8; /* 8 bit signed */
     2 typedef unsigned char quint8; /* 8 bit unsigned */
     3 typedef short qint16; /* 16 bit signed */
     4 typedef unsigned short quint16; /* 16 bit unsigned */
     5 typedef int qint32; /* 32 bit signed */
     6 typedef unsigned int quint32; /* 32 bit unsigned */
     7 #if defined(Q_OS_WIN) && !defined(Q_CC_GNU) && !defined(Q_CC_MWERKS)
     8 # define Q_INT64_C(c) c ## i64 /* signed 64 bit constant */
     9 # define Q_UINT64_C(c) c ## ui64 /* unsigned 64 bit constant */
    10 typedef __int64 qint64; /* 64 bit signed */
    11 typedef unsigned __int64 quint64; /* 64 bit unsigned */
    12 #else
    13 # define Q_INT64_C(c) static_cast<long long>(c ## LL) /* signed 64 bit constant */
    14 # define Q_UINT64_C(c) static_cast<unsigned long long>(c ## ULL) /* unsigned 64 bit constant */
    15 typedef long long qint64; /* 64 bit signed */
    16 typedef unsigned long long quint64; /* 64 bit unsigned */
    17 #endif
    18 
    19 typedef qint64 qlonglong;
    20 typedef quint64 qulonglong;
    21 
    22 template <int> struct QIntegerForSize;
    23 template <> struct QIntegerForSize<1> { typedef quint8 Unsigned; typedef qint8 Signed; };
    24 template <> struct QIntegerForSize<2> { typedef quint16 Unsigned; typedef qint16 Signed; };
    25 template <> struct QIntegerForSize<4> { typedef quint32 Unsigned; typedef qint32 Signed; };
    26 template <> struct QIntegerForSize<8> { typedef quint64 Unsigned; typedef qint64 Signed; };
    27 template <class T> struct QIntegerForSizeof: QIntegerForSize<sizeof(T)> { };
    28 typedef QIntegerForSizeof<void*>::Unsigned quintptr;
    29 typedef QIntegerForSizeof<void*>::Signed qptrdiff;
    30 
    31 typedef unsigned char uchar;
    32 typedef unsigned short ushort;
    33 typedef unsigned int uint;
    34 typedef unsigned long ulong;
     
  • 相关阅读:
    函数
    拉取代码到本地
    逻辑位运算符 以及 布尔运算符&&、||
    JS中substr与substring的区别
    ? :和!:的用法含义及es6语法...
    JS中attribute和property的区别
    并发、并行的理解
    斑鸠云商小程序记住账号和密码
    js中的foreach用法
    指针与数组
  • 原文地址:https://www.cnblogs.com/paullam/p/3706103.html
Copyright © 2020-2023  润新知