Boost logo

Boost :

Subject: Re: [boost] BOOST_PP array extension proposal
From: Edward Diener (eldiener_at_[hidden])
Date: 2015-09-11 08:57:36


On 9/11/2015 6:24 AM, Antoine Leblanc wrote:
> On 11 September 2015 at 09:46, Edward Diener <eldiener_at_[hidden]> wrote:
>> On 9/10/2015 5:38 PM, Antoine Leblanc wrote:
>>> I could maybe include both, and keep the tuple version behind a #ifdef
>>> BOOST_PP_VARIADIC?
>>
>> That's fine. It's BOOST_PP_VARIADICS BTW.
>
> Okay, it is done, I ported the array code to tuples.
>
> (I had to keep array at some point, though: my SORT works by inserting
> elements one by one in an buffer, which is therefore an empty
> container at the start of the loop. Since I can't start the loop with
> an empty tuple, BOOST_PP_TUPLE_SORT has to use an array buffer and
> convert it back to a tuple afterwards. I thought about using a
> non-empty tuple containing 0 as the buffer and dropping the first
> element afterwards, but this wouldn't work with SORT_U...)
>
> Newbie questions time, sorry: I can't seem to find information on how
> to submit my patch?

See https://svn.boost.org/trac/boost/wiki/StartModPatchAndPullReq.

> Also, I'm not sure I understand how BOOST_PP is
> tested: I'm currently using a small script that tries the macros with
> both g++ and clang++, but I'm not sure how to integrate it to the
> existing test suites.

It uses a Jamfile.v2 in the test sub-directory and tests in *.cxx files
in the test sub-directory. For arrays look at array.cxx and for tuples
look at tuple.cxx. Ideally every Boost PP macro should have its won .cxx
file but I never got around to implementing that.

>
> Thanks again for your time!
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk