[preprocessor]how to compute include with .hpp in name?
28 Jan
2017
28 Jan
'17
8:31 p.m.
With the attached, I get the error: g++ computed_include.hpp.cpp -o a.out In file included from computed_include.hpp.cpp:4:0: computed_include.hpp.cpp:5:22: error: pasting "computed_include" and "." does not give a valid preprocessing token #define FILENAME_INC computed_include ^ computed_include.hpp.cpp:7:58: note: in expansion of macro ‘FILENAME_INC’ #define FILENAME_CAT_STR BOOST_PP_STRINGIZE(BOOST_PP_CAT(FILENAME_INC,HPP_EXT)) ^ computed_include.hpp.cpp:8:10: note: in expansion of macro ‘FILENAME_CAT_STR’ #include FILENAME_CAT_STR ^ Is there some other way this can be done? TIA. -regards, Larry
2859
Age (days ago)
2859
Last active (days ago)
0 comments
1 participants
participants (1)
-
Larry Evans