Is Boost.Preprocessor self-sufficient?

I’m thinking about using it Boost.Preprocessorin some project, but I don’t want the whole Boost library to be dependent.

Can I just copy it alone and avoid it? Otherwise, what are its dependencies?

+3
source share
2 answers

New answer

I just got bcp:

./bcp --list preprocessor --boost=/usr/local/include/boost_1_45_0/ | grep -v preprocessor

no errors found

w / o grep I get something like:

/preprocessor.hpp
//arithmetic.hpp
///add.hpp
///dec.hpp
////div_base.hpp
///div.hpp
///inc.hpp
///mod.hpp
///mul.hpp
boost/preprocessor//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 preprocessor | sort |uniq

# BOOST_PP_ERROR:  # BOOST_PP_FILENAME_1
 # BOOST_PP_FILENAME_1
 # BOOST_PP_FILENAME_2
 # BOOST_PP_FILENAME_2
 # BOOST_PP_FILENAME_3
 # BOOST_PP_FILENAME_3
 # BOOST_PP_FILENAME_4
 # BOOST_PP_FILENAME_4
 # BOOST_PP_FILENAME_5
 # BOOST_PP_FILENAME_5
 # BOOST_PP_INDIRECT_SELF

grep -rhE "define\\s+BOOST_PP_FILENAME" /usr/include/boost/preprocessor/* | sort |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. , #undef ed in./detail/iter/forward#.hpp, , , - ...

+4

Source: https://habr.com/ru/post/1787777/


All Articles