Boost logo

Boost :

Subject: Re: [boost] [preprocessor] PP_CAT with symbols
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-09-25 07:46:12

On 24/09/2011 19:54, lcaminiti wrote:
> Hello all,
> I just want to confirm that the following:
> BOOST_PP_CAT(old_size =, =)
> correctly (and always) expands to:
> old_size ==
> I tested it on MSVC and GCC and it works. Plus from GCC documentation says
> about ##:

## can be used to concatenates two tokens into a single token.

> I am asking because ## has some limitation (x ## = is not valid, etc) so I
> want to confirm my understanding is correct.

x= is not a valid token.
What you want is just the sequence of the two tokens x and =, which is
written as x =

Boost list run by bdawes at, gregod at, cpdaniel at, john at