On Tuesday, 31 May 2022 at 08:27:17 UTC, forkit wrote:
>It IS a problem - that has to be explicately managed by the developer (I'm referring specifically to C/C++ here of course, as I regularly have to switch compilers).
The main problem, I guess, is that most codebases don't stick to the standard, but use extensions.
If you stay within the standard you can just check the feature matrix:
https://en.cppreference.com/w/cpp/compiler_support/20
And test new features using the provided feature testing macros:
https://en.cppreference.com/w/cpp/feature_test
Most of the time the docs provide a reference implementation that can be used if a library feature is missing.
A reasonable solution, IMO.