Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4400: BOOST_PP_SEQ_REPLACE fails in corner cases
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-05-24 18:25:55
#4400: BOOST_PP_SEQ_REPLACE fails in corner cases
--------------------------------------+---------------------------
Reporter: Wolf Lammen <ookami1@â¦> | Owner: no-maintainer
Type: Bugs | Status: new
Milestone: Boost 1.44.0 | Component: preprocessor
Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords:
--------------------------------------+---------------------------
Comment (by eldiener):
I agree with you that I am relying on what I tell the user is undefined
behavior. But that does not mean that the user should rely on that
behavior. In particular I do not want the user to rely on such behavior.
You talk about a change in interface as if it exists in an ideal vacuum.
What happens when that change of interface starts breaking current code,
such as thousands of lines that used to work fine ? No, sir, while I might
be willing to add some new macro I am not going to break anything which
people using Boost PP rely on.
In your approach an empty seq is perfectly fine, despite the fact that
testing for emptiness is highly flawed when variadic macros are not
supported by the compiler. I know about this issue as my entire Boost.VMD
library is based around the fact that for a compiler which does support
variadic macros ( which VMD must have ) testing for emptiness is still
very slightly flawed, but the VMD library can live with that flaw. In
Boost PP allowing a seq to be empty, ( or allowing a tuple to be empty ),
is going to cause all sorts of problems in Boost PP simply because it
cannot be reliably tested in a library which does support non-variadic
macros.
I could add to VMD a tuple or a seq which could be empty, because then
those who use VMD functionality to work with such a seq or tuple will not
be involved with code breakage, but I am not going to do it with Boost PP.
If you want to propose a separate macro to be added to Boost PP please
feel free to do it. I admit I did not look deeply into your solution
because I was looking for the easiest fix. If your fix is much more
efficient, using either a separate public macro, or a separate internal
macro, I will look at this issue again. But please realize that having
empty seqs ( or tuples ) in current Boost PP, or changing how the public
macro BOOST_PP_SEQ_REST_N works or should be used, is not an option.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4400#comment:10> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC