Subject: Re: [boost] Clang 600 and BOOST_SYSTEM_CONSTEXPR causes error_code.hpp compile failure.
From: Peter Dimov (lists_at_[hidden])
Date: 2018-07-08 14:42:55
> John Maddock wrote:
> > 1>C:\Program Files (x86)\Microsoft Visual Studio
> > 14.0\VC\include\system_error(168,18): note: declared here
> > 1> /* constexpr */ error_category() _NOEXCEPT // TRANSITION
> This commented-out constexpr (in the 2015 headers) is the problem, thanks.
> Now how do we work around it...
The problem here is that Clang can pick up and use any MSVC headers it finds
depending on who knows what search algorithm, and to work around the
commented-out constexpr I need to detect that it uses the 2015 STL (because
the 2017 STL would presumably have the constexpr, although I haven't checked
all of its flavors.)
I'm not sure that checking _MSC_VER would be enough, as I suspect that Clang
doesn't take the compatibility version into account when searching for
headers to use. There's _CPPLIB_VER, but I can't find what values correspond
to what versions. Boost.Config says that certain things appeared in 520,
540, 610, 650, but what releases do these correspond to?
In addition, Microsoft stopped increasing _CPPLIB_VER at some point
(starting with 2017?), then added their own macro (a welcome addition) but I
can't recall how that was called, when it was added, and can find no info on
that either. :-)
It ain't easy.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk