Opened 9 years ago
#8705 new Bugs
BOOST_PP_ENUM_SHIFTED doesn't work with Intel ICC
Reported by: | Owned by: | No-Maintainer | |
---|---|---|---|
Milestone: | To Be Determined | Component: | preprocessor |
Version: | Boost 1.53.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Consider this example:
#include <boost/preprocessor/repetition.hpp> #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, ~)
With clang++ -P -E
and g++ -P -E
it expands correctly:
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 ) ;
But icpc -P -E
gets stuck:
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 );
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;
Note:
See TracTickets
for help on using tickets.