id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6616,boost preprocessor bug in 1.49,sni4ok@…,No-Maintainer,"this example work incorrect with boost 1.49 on g++ 4.61 with compile flags -std=gnu++0x[[BR]] [[BR]] #define WRITE_TEST_VALUE(r, data, num, name) std::cout << "", num: "" << num << "", name: "" << BOOST_PP_STRINGIZE(name);[[BR]] #define ON_FOREACH_ARGS(ArgsArray, Functor) \[[BR]] BOOST_PP_LIST_FOR_EACH_I(Functor, , \[[BR]] BOOST_PP_TUPLE_TO_LIST(BOOST_PP_ARRAY_SIZE(ArgsArray), BOOST_PP_ARRAY_DATA(ArgsArray)))[[BR]] #define TEST_PP_LIST_FOREACH(ArgsArray) \[[BR]] std::cout << "" sz: "" << BOOST_PP_ARRAY_SIZE(ArgsArray); \[[BR]] ON_FOREACH_ARGS(ArgsArray, WRITE_TEST_VALUE)[[BR]] #include [[BR]] #include [[BR]] #include [[BR]] #include [[BR]] #include [[BR]] [[BR]] int main()[[BR]] {[[BR]] std::cout << ""0:"" << std::endl;[[BR]] TEST_PP_LIST_FOREACH((0, ()))[[BR]] std::cout << std::endl << ""1:"" << std::endl;[[BR]] TEST_PP_LIST_FOREACH((1, (bla)))[[BR]] std::cout << std::endl << ""2:"" << std::endl;[[BR]] TEST_PP_LIST_FOREACH((2, (nu, bla)))[[BR]] std::cout << std::endl;[[BR]] return 0;[[BR]] }[[BR]] [[BR]] output:[[BR]] g++ test_pp.cpp -I/home/snike/boost/boost_1_49_0[[BR]] ./a.out[[BR]] 0:[[BR]] sz: 0[[BR]] 1:[[BR]] sz: 1, num: 0, name: bla[[BR]] 2:[[BR]] sz: 2, num: 0, name: nu, num: 1, name: bla[[BR]] [[BR]] output2:[[BR]] g++ test_pp.cpp -I/home/snike/boost/boost_1_49_0 -std=gnu++0x[[BR]] ./a.out[[BR]] 0:[[BR]] sz: 0, num: 0, name:[[BR]] 1:[[BR]] sz: 1, num: 0, name: bla[[BR]] 2:[[BR]] sz: 2, num: 0, name: nu, num: 1, name: bla[[BR]] [[BR]] on boost 1.48 this example work correctly",Bugs,closed,To Be Determined,preprocessor,Boost 1.49.0,Problem,fixed,,