C ++ 11:intptr_t / int_ptr_t,intmax_t / int_max_t? [英] C++11: intptr_t/int_ptr_t, intmax_t/int_max_t?
问题描述
我在c ++ 11上做了一些阅读,我注意到了一些关于int类型名称的事情。现在,显然规范只能通过支付,但是有一个从2月的早期草案可以在 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf
I'm doing a bit of reading on c++11 and I've noticed a couple things about int type names. Right now, apparently the spec is only available by paying for it but there is an early draft from February available at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf
但是我注意到在c ++ 11维基百科页面en.cppreference.com上引用的网站,这是一对标准整数类型的差异。
However I noticed on a website which is cited on the c++11 wikipedia page, en.cppreference.com, a discrepency in a couple of the standard integer types.
http://en.cppreference.com/的网页w / cpp / types / integer 提到各种固定宽度整数类型,还包括 int_max_t
和 int_ptr_t
。但是上面链接的使用 intmax_t
和 intptr_t
(没有中间下划线)在例如MS的 crtdefs.h
和boost的 cstdint.hpp
。
The page at http://en.cppreference.com/w/cpp/types/integer mentions various fixed-width integer types, and also int_max_t
and int_ptr_t
. However the spec linked above uses intmax_t
and intptr_t
(without the middle underscore) which I am used to and which already exists in, for example, MS's crtdefs.h
, and boost's cstdint.hpp
. Is this likely just a typo on the website, did this change in the spec since the February draft?
编辑删除了有关头文件的内容,这是不相关的。
Edit Removed stuff about the header files, it was irrelevant.
推荐答案
是的,这只是在网站上的拼写错误。从FDIS,§18.4.1( Header< cstdint>摘要
):
Yes, it's just a typo on the website. From the FDIS, §18.4.1 (Header <cstdint> synopsis
):
namespace std {
...
  ;typedef
有符号整型intmax_t;
;typedef
有符号整型intptr_t; //
可选
...
typedef
无符号整型uintmax_t;
typedef
无符号整型uintptr_t; //
可选
} //
namespace std
namespace std {
...
typedef
signed integer typeintmax_t;
typedef
signed integer typeintptr_t; //
optional
...
typedef
unsigned integer typeuintmax_t;
typedef
unsigned integer typeuintptr_t; //
optional
} //
namespace std
这篇关于C ++ 11:intptr_t / int_ptr_t,intmax_t / int_max_t?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!