AMDG On 03/11/2014 02:46 AM, Albert wrote:
I tried to use the BOOST_PP_SEQ_CAT with a sequence of parenthesized comma-separated pair of token. It works fine with visual 2010 but fails with gcc. I first think that there were a problem in the specific gcc implementation part. That's why I opened the issue 9633 : https://svn.boost.org/trac/boost/ticket/9633 But, it has recently been closed for invalidity, the corrector telling that it is not a valid use.
<snip> So my questions are : => why the code I proposed is invalid ?
You are correct that this is a valid sequence. The problem is that the elements cannot be concatenated. BOOST_PP_CAT(('a', 1), ('b', 2)) should also fail with a similar error.
=> Is the workaround proposed with BOOST_PP_SEQ_FOR_EACH is also a missused and may fail according to evolutions of the library ?
Your workaround does not use ## and is therefore perfectly fine. In Christ, Steven Watanabe