gpt4 book ai didi

boost-preprocessor - Boost.Preprocessor 是独立的吗?

转载 作者:行者123 更新时间:2023-12-01 13:03:04 27 4
gpt4 key购买 nike

我正在考虑在某些项目中使用 Boost.Preprocessor,但我不想让整个 Boost 库成为依赖项。

我可以单独复制它并摆脱它吗?否则,它的依赖项是什么?

最佳答案

新答案

我刚刚让 bcp 工作:

./bcp --list 预处理器 --boost=/usr/local/include/boost_1_45_0/| grep -v 预处理器

no errors detected

没有 grep 我得到类似的东西:

boost/preprocessor.hpp
boost/preprocessor/arithmetic.hpp
boost/preprocessor/arithmetic/add.hpp
boost/preprocessor/arithmetic/dec.hpp
boost/preprocessor/arithmetic/detail/div_base.hpp
boost/preprocessor/arithmetic/div.hpp
boost/preprocessor/arithmetic/inc.hpp
boost/preprocessor/arithmetic/mod.hpp
boost/preprocessor/arithmetic/mul.hpp
boost/preprocessor/arithmetic/sub.hpp


原始答案

尝试使用 boost bcp 实用程序复制它

我做了一个快速的 grep -R "include"/usr/include/boost/preprocessor/* | grep -v preprocessor 并没有找到任何匹配项。我可以发誓需要配置。

编辑(我的 grep-ful 很弱 =/)grep -rh "include"/usr/include/boost/preprocessor/* | grep -v 预处理器 |排序 |uniq

# error BOOST_PP_ERROR: no indirect file to include
# include BOOST_PP_FILENAME_1
# include BOOST_PP_FILENAME_1
# include BOOST_PP_FILENAME_2
# include BOOST_PP_FILENAME_2
# include BOOST_PP_FILENAME_3
# include BOOST_PP_FILENAME_3
# include BOOST_PP_FILENAME_4
# include BOOST_PP_FILENAME_4
# include BOOST_PP_FILENAME_5
# include BOOST_PP_FILENAME_5
# include BOOST_PP_INDIRECT_SELF

grep -rhE "define\\s+BOOST_PP_FILENAME"/usr/include/boost/preprocessor/* |排序 |uniq

# define BOOST_PP_FILENAME_1 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_1)
# define BOOST_PP_FILENAME_2 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_2)
# define BOOST_PP_FILENAME_3 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_3)
# define BOOST_PP_FILENAME_4 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_4)
# define BOOST_PP_FILENAME_5 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_5)

BOOST_PP_ITERATION_PARAMS_# 似乎没有在任何地方#defined。奇怪的是,它们在 ./detail/iter/forward#.hpp 中被#undef编辑,所以我可能遗漏了一些嵌套宏或其他...

关于boost-preprocessor - Boost.Preprocessor 是独立的吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4797616/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com