boostorg / boostorg/preprocessor

Add BOOST_PP_BOOL_true and BOOST_PP_BOOL_false definitions

未关闭
#55 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
118
派生
76
PR 合并指标
30 天内没有已合并 PR

描述

I suggest to define a new macro
```c++
#define BOOST_PP_BOOL_true 1
#define BOOST_PP_BOOL_false 0
```
for make that possible:
```c++
BOOST_PP_IF(BOOST_PP_BOOL(true/false), "YES", "NO")
// ^-- Expands into 1/0
```
It seems like simple behavior and I have no idea why its not added yet.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先在预处理器模块中定位现有的 BOOST_PP_BOOL 实现及其测试。检查类似布尔值的宏名称是如何定义和使用的,然后添加 true 和 false 的定义,并验证 BOOST_PP_IF 对这些输入接收的是 1 还是 0。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
compilers
Issue 类型
功能
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。