integer-promotion

标签

Cards List
#integer-promotion

true 的补码是 true,除非它不是

Lobsters Hottest ↗ · 2026-10-04 缓存

一篇分析 WG21 提案 P4313R1(C++ 位掩码枚举操作)的博客文章,探讨了在小整数类型和 bool 上执行位运算(例如 ~true)时,整型提升与布尔转换所带来的陷阱。

0 人收藏 0 人点赞
← 返回首页

提交意见反馈