Boost logo

Boost :

Subject: Re: [boost] [preprocessor] PUSH_BACK/_FRONT on empty array broken in 1.49
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2012-04-03 16:18:24

On Tue, 03 Apr 2012 17:34:58 +0200, Jan Boehme wrote:

> Hi!
> leads to invalid code if Boost 1.49 is used.
> In 1.48 and older it works as expected.
> An incident was already filed and a sample attached:
> Thanks for solving. Let me know if I can be of further assist. Jan

Ticket closed--not a bug.

It *happened* to work in older versions primarily because the tuple
implementation had a backdoor to all () as a nil tuple is *some* cases.
However, () is not a nil tuple--particularly not in C99+ or C++11+. There
is no such thing as a zero-element array (or tuple), and the array
implementations defer to the tuple implementations. (0, ()) is invalid,
as it should be (1, ()) just as with (2, (,)) and (3, (,,)).

If there was a nil array, all of the array operations would have to go out
of there way to handle it specially.

Paul Mensonides

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