PP: BOOST_PP_CAT concatenate an argument with a whitespace

Hi, BOOST_PP_CAT( MACRO1, MACRO2 ); MACRO1 expands to double MACRO2 expands to x BOOST_PP_CAT( MACRO1, MACRO2 ); therefore expands to doublex; I am trying to get the statement double x; I couldn't find any macro that expands to whitespace? I am missing something obvious here Regards,

On 6 February 2010 17:13, Hicham Mouline
Hi,
BOOST_PP_CAT( MACRO1, MACRO2 );
MACRO1 expands to double MACRO2 expands to x
BOOST_PP_CAT( MACRO1, MACRO2 ); therefore expands to doublex;
I am trying to get the statement
double x;
Can't you just write MACRO1 MACRO2? Daniel

-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Daniel James Sent: 06 February 2010 17:27 To: boost-users@lists.boost.org Subject: Re: [Boost-users] PP: BOOST_PP_CAT concatenate an argument with a whitespace
On 6 February 2010 17:13, Hicham Mouline
wrote: Hi,
BOOST_PP_CAT( MACRO1, MACRO2 );
MACRO1 expands to double MACRO2 expands to x
BOOST_PP_CAT( MACRO1, MACRO2 ); therefore expands to doublex;
I am trying to get the statement
double x;
Can't you just write MACRO1 MACRO2?
Daniel Yes, the BOOST_PP_CAT was inside a BOOST_PP_IF so it confused as to whether just writing the space there would work. It did.
Thanks,
participants (2)
-
Daniel James
-
Hicham Mouline