Boost logo

Boost Users :

Subject: Re: [Boost-users] BOOST_PP_ERROR(0x0003, BOOST_PP_REPEAT_OVERFLOW) with multiply nested BOOST_PP_REPEATS
From: Colin Fowler (fowler_at_[hidden])
Date: 2014-09-26 16:46:15


On 26-09-2014 20:38, pfultz2 wrote:
>> Am I hitting a nesting depth limit or something else? Is there a way
>> around this? Ideally I want to write a decl5 macro and have
>> successfully
>> written a decl1, decl2 and decl3 so far
>
> Ok, the best way seems to generate a sequence of your data:
>
<SNIP>
> Paul Fultz II
>
>

Thanks Paul, that is beautiful. My actual use case involves generating
functions (not just int x_....) and using
the values in the function name and body like so:

void foo_6_5_4_3_2()
{
      //Some function involving x,y,z,w such as
      bar[4] = foo[3] + 2 * 6 + sqrt(5);
}

Am I right in saying that I Ssould be able to turn the current sequence
into a tuple and access the members for use in the function body?

Regards,
         Colin


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net