高手们,很多库重新定义通用类型是什么心理比如:C/C++ codetypedefsignedcharint_least8_t typedefunsigne
高手们,很多库重新定义通用类型是什么心理
比如:
- C/C++ code
typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int_least16_t; typedef unsigned short uint_least16_t; typedef int int_least32_t; typedef unsigned uint_least32_t; typedef long int_least64_t; typedef unsigned long uint_least64_t;
给通用类型取个新名字,有什么用呢?就直接用C++的官方名称不好吗?难道是嫌官方名称啰嗦?
我一般会把unsigned int 写成uint,依次类推,但是很多库重新定义了之后是一个很长,很难写的名字,这给看库的人多少额外的工作量啊?每次看到一个定义,还得回头翻头文件,看看到底是什么意思。
[解决办法]
