-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maybe: add JUST_MSG
and CHECK_JUST_MSG
#5904
maybe: add JUST_MSG
and CHECK_JUST_MSG
#5904
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
添加一点单测,那其实也是告诉别人怎么用。
单测脚本的写法可以参考common/range_test.cpp
有没有可能用一些 trick 做到不额外引入 JUST_MSG,维持 JUST 的现有用法,并同时支持 msg。思路是 ”逗号应该被当作参数分隔符“ 和 ”逗号不出现在 <>、() 内“ 应该是等价的,在编译期对字符串常量 OF_PP_STRINGIZE((__VA_ARGS__)) 做分析,就能正确的分割参数。不知道这个思路是不是有可行性 |
在预处理期不太能有方法分辨出 |
好的,我先放弃我的想法了 |
Done |
Close #5855
Usage: