id summary reporter owner description type status milestone component version severity resolution keywords cc 6989 BOOST_PP_SEQ_ELEM/BOOST_PP_IF behave differently on different compilers vanyacpp@… No-Maintainer "MSVC accepts the following code, but gcc reject it with error message that it is impossible to get second element of sequence with size = 1. The problem is that gcc and clang expand both HANDLE_SIZE_EQ_1 and HANDLE_SIZE_EQ_2 before expanding BOOST_PP_IF. As it turned out MSVC and GCC get different versions of BOOST_PP_SEQ_ELEM. When MSVC get version of BOOST_PP_SEQ_ELEM for GCC it also show warning. See connect.microsoft.com/VisualStudio/feedback/details/743894/possibly-incorrect-macro-expansion-order for details. // boost version 1.49 #include #include #include #include #define HANDLE_SIZE_EQ_1(seq) #define HANDLE_SIZE_EQ_2(seq) \ BOOST_PP_SEQ_ELEM(1, seq) #define TEST_IF(seq) \ BOOST_PP_IF(BOOST_PP_NOT_EQUAL(2, BOOST_PP_SEQ_SIZE(seq)) \ , HANDLE_SIZE_EQ_1(seq) \ , HANDLE_SIZE_EQ_2(seq)) TEST_IF((a)) " Bugs closed To Be Determined preprocessor Boost 1.49.0 Problem fixed