[Mesa-dev] [PATCH v4 0/2] build system: Unify c++11 detection and used [was: configure+mesa/st:check -std=c++11 support and enable tests accordingly]

Emil Velikov emil.l.velikov at gmail.com
Thu Oct 26 15:59:28 UTC 2017


On 17 October 2017 at 16:54, Chuck Atkins <chuck.atkins at kitware.com> wrote:
>> I also think adding a test for each C++11 feature used in the code is
>>
>> too tedious, regardless of the build system, and it would really need a
>> dedicated maintainer.
>
>
> Certainly.  Rather than checking for everything, I think a code snippet that
> just includes a few c++11-only headers would be sufficient and just assume
> if those are there then you have a working c++11 std library.  That's all
> we're doing with the std=c++11 check anyways; i.e. we're assuming that
> there's no need to specifically check for support of range-for loops and
> lambda expressions separately.  Partial standard implementation is less of
> an issue these days I think than in the early C++11 years.
>
My take on the thread so far is - there's weird combos that will
almost always be broken.
Having brown tests and/or workarounds for everyone is impossible.

A compiler "accepting" C++11 code without having a runtime library
provided, is an interesting example.

That said, I think we can aim at:
 - step 1, cover the case that works for most people
 - step 2, if things are broken for A/B send patches clearly
documented patches - compiler, version, platform, etc.
 - step 3, don't be afraid to deprecate/remove obsolete workarounds
and do poke the affected people.

That's just a personal take of course, so take it with a healthy pinch of salt.
-Emil


More information about the mesa-dev mailing list