On 14/01/2019 21:05, Niall Douglas via Boost wrote:
I guess ideally speaking Boost.Config gains a new test testing for this specific compiler parsing bug. But it seems a bit much to ask for this just for Outcome.
One option is to use the Predef checks < https://www.boost.org/doc/libs/release/doc/html/predef/check_utilities.html#predef.check_utilities.using_with_boost_build>. Another option is to implement a check program of your own.
So, stitching together from your linked docs, something like (untested): [snip]
After an amount of trial and error, I came up with: [ predef-require "!BOOST_COMP_GNUC" or "BOOST_COMP_GNUC >= 6.0" ] Note that the documentation for Predef does not say that the above syntax works - I had to dig into the jam source and inspect the temporary files generated by Predef to figure out the above. Predef's documentation ought to mention that the "!" operator is supported for detecting undefinedness, as comparing equal to 0 does not work as expected due to "0" being expanded into BOOST_VERSION_NUMBER(0,0,0) which did not test to true when the compiler was MSVC. It also ought to explain how version strings in the Build checks are parsed into BOOST_VERSION_NUMBER(...), because my first "obvious" five attempts yielded malformed C. Anyway, looks like we have a solution. Thanks for the help. Niall