Subject: Re: [boost] Libraries and C++ compliance
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-04-10 14:53:14
> 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.
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.
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk