Boost logo

Boost :

Subject: Re: [boost] Libraries and C++ compliance
From: Edward Diener (eldiener_at_[hidden])
Date: 2017-04-10 16:57:28

On 4/10/2017 10:53 AM, Niall Douglas via Boost wrote:
>> course some compilers, aka VC++, can not be adjusted in such a way, so
>> that it is also important for the end-user himself to know what level of
>> compliance a particular compiler supports.
> The newer MSVC's now have a /std: switch. You'll be glad to know it
> doesn't follow the same semantics as -std= because well, it's Microsoft.

The new MSVC remains completely undocumented more than one month after
it has been released, so whatever /std: switch it does have is guesswork
AFAICS. But yes, if the new MSVC has such a switch it is an advance over
the previous versions which just offered a single level of C++
compliance, whatever it was, which the end-user had to understand exactly.

> cmake 3.8 does not appear to understand the MSVC /std: switch yet
> because if you ask it for the C++ 17 standard when targeting MSVC, it pukes.
>> As a side note I would really like to see libraries, which are tailored
>> for Boost, use the Boost Config C++ feature testing macros to put out
>> preprocessor #error messages when a feature that it needs is not
>> supported during compilation, rather than letting the compiler simply
>> fail because the construct in code cannot be parsed at the C++
>> conformance level the code expects. I even note that a number of our
>> current libraries do not do this, but should. It is much more
>> understandable to get a preprocessor #error message specific to the C++
>> feature needed in such cases, than to get a nest of difficult to
>> decipher compile failures for particular constructs.
> Most of the compilers released during the last two years have varying
> support for C++17 feature test macros (VS2017 is very compliant here
> interestingly). If your library has no dependency on Boost, use those.
> Niall

Boost list run by bdawes at, gregod at, cpdaniel at, john at