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.