Boost logo

Boost :

From: Boris Kolpackov (boris_at_[hidden])
Date: 2022-05-09 12:34:03


Peter Dimov via Boost <boost_at_[hidden]> writes:

> I'd say that the important standard conformance level is the compiler's default
> one, because that's what all the distro's packages use (and what `b2` uses if not
> given `cxxstd`, which is how Boost is being built today.)

IMO, talking about targeting a C++ standard like C++11 or C++14 is not
very useful since every major C++ compiler (GCC, Clang, MSVC) completes
support for the next standard over multiple releases. As a result, while
compilers may not have complete support, they often include a perfectly
usable subset of the features.

In this light, what we found more useful is to specify the minimum
versions of the three major compilers that we are willing to support
and any features that are available in all three are a fair game.

I suppose specifying the standard (e.g., C++N), then mapping that
to the versions of the major compilers that enable it by default,
and then using them as minimum supported compiler versions would
be another way to do it. But I think semantically the result is the
same: you are only able to use a subset of C++N that is available
in all these compiler versions.

FWIW, in build2 we had good results with picking GCC 4.9, Clang 3.7,
and MSVC 14u3 and getting a very usable subset of C++14 (including
move capture and generic lambdas).


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk