[preprocessor] ARRAY_REPLACE bug?
On Windows 7/Cygwin, using boost 1.53, preprocessing the following snippet:
pp_array.cc
-----------
#include
On 7/25/2013 5:10 AM, Mostafa wrote:
On Windows 7/Cygwin, using boost 1.53, preprocessing the following snippet:
pp_array.cc ----------- #include
//#define BOOST_PP_TUPLE_REM_0() // nothing
#define ARRAY (3, (a, x, c)) BOOST_PP_ARRAY_REPLACE(ARRAY, 1, b)
via: g++ -E -P -I /... pp_array.cc
gives the following incorrect result: (3, (BOOST_PP_TUPLE_REM_0 () a, b , c))
Uncommenting the pound define in the snippet gives the correct result for the preprocessor.
Is this a bug?
It looks like a bug to me. In your 1.53 version of tuple/rem.hpp add: # define BOOST_PP_TUPLE_REM_0() before the line which says: # define BOOST_PP_TUPLE_REM_1(e0) e0 For some reason, possibly an oversight, Paul removed the "# define BOOST_PP_TUPLE_REM_0()" from tuple/rem.hpp when variadic macro support was added to the preprocessor.
On Thu, 25 Jul 2013 04:51:03 -0700, Edward Diener
On 7/25/2013 5:10 AM, Mostafa wrote: [snip]
Is this a bug?
It looks like a bug to me. In your 1.53 version of tuple/rem.hpp add:
# define BOOST_PP_TUPLE_REM_0()
before the line which says:
# define BOOST_PP_TUPLE_REM_1(e0) e0
For some reason, possibly an oversight, Paul removed the "# define BOOST_PP_TUPLE_REM_0()" from tuple/rem.hpp when variadic macro support was added to the preprocessor.
I'm going to assume this is going to be fixed in svn without me having to file a ticket ... Thanks, Mostafa
On 7/25/2013 4:44 PM, Mostafa wrote:
On Thu, 25 Jul 2013 04:51:03 -0700, Edward Diener
wrote: On 7/25/2013 5:10 AM, Mostafa wrote: [snip]
Is this a bug?
It looks like a bug to me. In your 1.53 version of tuple/rem.hpp add:
# define BOOST_PP_TUPLE_REM_0()
before the line which says:
# define BOOST_PP_TUPLE_REM_1(e0) e0
For some reason, possibly an oversight, Paul removed the "# define BOOST_PP_TUPLE_REM_0()" from tuple/rem.hpp when variadic macro support was added to the preprocessor.
I'm going to assume this is going to be fixed in svn without me having to file a ticket ...
That's fine. I will update SVN on the trunk if I don't hear anything from Paul otherwise in a few days.
On 7/25/2013 4:37 PM, Edward Diener wrote:
On 7/25/2013 4:44 PM, Mostafa wrote:
I'm going to assume this is going to be fixed in svn without me having to file a ticket ...
That's fine. I will update SVN on the trunk if I don't hear anything from Paul otherwise in a few days.
Go ahead and do it, Edward. I can't get to it for a few days. -Paul
On 7/29/2013 4:31 AM, Paul Mensonides wrote:
On 7/25/2013 4:37 PM, Edward Diener wrote:
On 7/25/2013 4:44 PM, Mostafa wrote:
I'm going to assume this is going to be fixed in svn without me having to file a ticket ...
That's fine. I will update SVN on the trunk if I don't hear anything from Paul otherwise in a few days.
Go ahead and do it, Edward. I can't get to it for a few days.
Done ! We need better PP tests to catch such a situation. I will try to find time to update the tests before the next Boost version.
participants (3)
-
Edward Diener
-
Mostafa
-
Paul Mensonides