Boost.Preprocessor 是独立的吗?
我正在考虑在某些项目中使用 Boost.Preprocessor,但我不想使整个 Boost 库成为依赖项。
我可以单独复制它并逃脱惩罚吗?否则,它的依赖是什么?
I'm thinking about using Boost.Preprocessor
in some project, but I don't want to make the entire Boost library a dependency.
Can I just copy it alone and get away with this? Otherwise, what are its dependencies?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
新答案
我刚刚让
bcp
工作:./bcp --list preprocessor --boost=/usr/local/include/boost_1_45_0/ | grep -v 预处理器
没有 grep 我得到类似的信息:
原始答案
尝试使用 boost bcp 实用程序来复制它
我做了一个快速的 grep -R "include" /usr/include/boost/preprocessor/* | grep -v 预处理器 并没有找到任何匹配项。我可以发誓需要配置。
编辑(我的 grep-ful 很弱=/)
grep -rh "include" /usr/include/boost/preprocessor/* | | grep -rh "include" /usr/include/boost/preprocessor/* | grep -v 预处理器 |排序 |uniq
grep -rhE "define\\s+BOOST_PP_FILENAME" /usr/include/boost/preprocessor/* |排序 |uniq
BOOST_PP_ITERATION_PARAMS_# 似乎没有在任何地方
#define
。奇怪的是,它们在 ./detail/iter/forward#.hpp 中#undef
编辑,所以我可能缺少一些嵌套宏或其他...New Answer
I just got
bcp
working:./bcp --list preprocessor --boost=/usr/local/include/boost_1_45_0/ | grep -v preprocessor
w/o the grep I get something like:
Original answer
Try using the boost
bcp
utility to copy itI did a quick
grep -R "include" /usr/include/boost/preprocessor/* | grep -v preprocessor
and didn't come up with any matches. I could have sworn that config was needed.Edit (my grep-ful is weak =/)
grep -rh "include" /usr/include/boost/preprocessor/* | grep -v preprocessor | sort |uniq
grep -rhE "define\\s+BOOST_PP_FILENAME" /usr/include/boost/preprocessor/* | sort |uniq
BOOST_PP_ITERATION_PARAMS_# don't seem to be
#defined
anywhere. Strangely enough, they are#undef
ed in ./detail/iter/forward#.hpp so I'm probably missing some nested macro or other...如http://www.boost.org/doc/libs/1_45_0/ ,预处理器是一个仅包含头文件的库。不需要运行时库。
As stated at http://www.boost.org/doc/libs/1_45_0/ , Preprocessor is a header only library. No run time library needed.