Boost C++ Libraries: Ticket #8705: BOOST_PP_ENUM_SHIFTED doesn't work with Intel ICC https://svn.boost.org/trac10/ticket/8705 <p> Consider this example: </p> <pre class="wiki">#include &lt;boost/preprocessor/repetition.hpp&gt; #define F(z, n, p) n #define INNER_NORMAL(z, n, p) f( BOOST_PP_ENUM(n, F, p) ) ; #define INNER_SHIFTED(z, n, p) f( BOOST_PP_ENUM_SHIFTED(n, F, p) ) ; shifted: BOOST_PP_REPEAT(4, INNER_SHIFTED, ~) expected: INNER_SHIFTED(~, 0, ~) INNER_SHIFTED(~, 1, ~) INNER_SHIFTED(~, 2, ~) INNER_SHIFTED(~, 3, ~) normal: BOOST_PP_REPEAT(4, INNER_NORMAL, ~) </pre><p> With <code>clang++ -P -E</code> and <code>g++ -P -E</code> it expands correctly: </p> <pre class="wiki">shifted: f( ) ; f( ) ; f( 1 ) ; f( 1 , 2 ) ; expected: f( ) ; f( ) ; f( 1 ) ; f( 1 , 2 ) ; normal: f( ) ; f( 0 ) ; f( 0 , 1 ) ; f( 0 , 1 , 2 ) ; </pre><p> But <code>icpc -P -E</code> gets stuck: </p> <pre class="wiki">shifted: f( BOOST_PP_ENUM_SHIFTED_1_2(0, F, ~) ); f( BOOST_PP_ENUM_SHIFTED_1_2(1, F, ~) ); f( BOOST_PP_ENUM_SHIFTED_1_2(2, F, ~) ); f( BOOST_PP_ENUM_SHIFTED_1_2(3, F, ~) ); expected: f( ); f( ); f( 1 ); f( 1, 2 ); normal: f( ); f( 0 ); f( 0, 1 ); f( 0, 1, 2 ); </pre><p> I'm using *Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.1.1.163 Build 20130313*, not sure if it's a bug in ICC or in Boost.Preprocessor; </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8705 Trac 1.4.3