From: Edward Diener (eldiener_at_[hidden])
Date: 2019-11-12 20:07:42
On 11/12/2019 11:32 AM, Edward Diener via Boost wrote:
> I had added support in the Boost PP library in C20 mode ( __cplusplus >
> 201703L ) for the __VA_OPT__ construct and enhanced an internal function
> used fairly extensively in the library to use this functionality in c20
> mode when __VA_OPT__ was supported. I had tested this against the
> compilers which I knew could operate in c20 mode, gcc and clang, and all
> was well. I just discovered that the vc++ compiler can also work in c20
> mode in Boost PP as defined above if you pass the '/std:c++latest' and
> the '/Zc:__cplusplus' command line switches and that vc++, in its usual
> non-standard way, blows up badly when doing so using the preprocessor
> library because it can not handle the rather simple code that checks for
> __VA_OPT__ support in c20 mode.
> I have a simple fix for this which is to turn off the __VA_OPT__ support
> and __VA_OPT__ support checking in c20 mode specifically for vc++ and
> removes which I have pushed to 'develop'. Can I push this fix to the
> 'master' branch now ? The fix needs to get in the coming release or else
> vc++ programmers specifying both the '/std:c++latest' and the
> '/Zc:__cplusplus' command line switched will not be able to use Boost PP
> and the many libraries which use Boost PP in the upcoming release.
> I apologize for the seeming aggressiveness of this change, which
> incorporated the c20 __VA_OPT__ support internally in some much-used
> Boost PP functionality when c20 mode is being used, but I did not
> anticipate that it would blow up on me, although maybe I should have. I
> can also remove that internal dependency with a very simple one-line
> change. I realize that Boost PP stability has to be maintained, even in
> c20 mode for the few compilers which support that mode and apologize
> again that I have endangered it there.
I pushed a fix to the 'master' branch to get vc++ in c20 mode to work
correctly. I am 100% sure that this is safe.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk