简体   繁体   English

C ++中的范围_t尾名称

[英]Scoped _t-ending names in C++

Does the rule about _t-ending names being reserved also apply to scoped names (eg, types and typedefs defined within namespaces or within classes) or is it just for types and typedefs in the global namespace? 关于保留_t结尾名称的规则是否也适用于作用域名称(例如,在名称空间或类内定义的类型和typedef),还是仅适用于全局名称空间中的类型和typedef? Could an implementation of a standard C/C++ library or a POSIX library ever use these names as macros in its headers? 标准C / C ++库或POSIX库的实现是否可以将这些名称用作其标头中的宏? (If it could, then I think that answers the first question). (如果可以,那么我认为这可以回答第一个问题)。

POSIX保留以“ _t”结尾的名称(据我所知,在任何上下文中)( http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html ),因此如果出现以下情况,则不应在任何上下文中使用它们您的目标是POSIX系统(几乎可以归结为“不使用它们”)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM