|
Boost : |
Subject: Re: [boost] Clang 600 and BOOST_SYSTEM_CONSTEXPR causes error_code.hpp compile failure.
From: John Maddock (jz.maddock_at_[hidden])
Date: 2018-07-08 16:13:20
On 08/07/2018 15:42, Peter Dimov via Boost wrote:
>> 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 preprocessed the source and it's picking up the latest headers for me:
m:\\compilers\\vc2017\\vc\\tools\\msvc\\14.13.26128\\include\\system_error
and I still see:
class error_category
   {   // categorize an error
public:
   /* constexpr */ error_category() _NOEXCEPT   // TRANSITION
      {   // default constructor
      _Addr = reinterpret_cast<uintptr_t>(this);
      }
In that header.
Defines wise we have:
Clang version 6.0.0 (tags/RELEASE_600/final)
   _CPPUNWIND                             =1
   __cplusplus                            =201402L
   _WIN32                                 =1
   _WIN64                                 =1
   _CPPRTTI                               =1
   _CPPUNWIND                             =1
   _DLL                                   =1
   _M_AMD64                               =100
   _M_X64                                 =100
   _MSC_BUILD                             =1
   _MSC_EXTENSIONS                        =1
   _MSC_VER                               =1900
   _MSC_FULL_VER                          =190000000
   _MSVC_LANG                             =201402L
   _MT                                    =1
   _NATIVE_WCHAR_T_DEFINED                =1
   __VERSION__                            ="4.2.1 Compatible Clang
6.0.0 (tags/RELEASE_600/final)"
Dinkumware standard library version 650
   _CPPLIB_VER                            =650
   _GLOBAL_USING                          =1
   _HAS_EXCEPTIONS                        =1
   _HAS_CXX17                             =0
   _HAS_AUTO_PTR_ETC                      =1
   _HAS_OLD_IOSTREAMS_MEMBERS             =1
   _HAS_FUNCTION_ASSIGN                   =1
   _HAS_TR1_NAMESPACE                     =1
   _HAS_IDENTITY_STRUCT                   =1
   _ITERATOR_DEBUG_LEVEL                  =2
   _HAS_ITERATOR_DEBUGGING                =1
   _ITERATOR_DEBUG_ARRAY_OVERLOADS        =1
Not sure if this helps, John.
--- This email has been checked for viruses by AVG. https://www.avg.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk