[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: To C++11 or not?
From:       Aleix Pol <aleixpol () kde ! org>
Date:       2016-11-14 23:19:58
Message-ID: CACcA1RoD4fTfqFLbKAxJgRk_OBPn3m9pgAYgKE-==xV-ZA0Rzg () mail ! gmail ! com
[Download RAW message or body]

On Mon, Nov 14, 2016 at 7:21 PM, Dominik Haumann <dhaumann@kde.org> wrote:
> Hi,
>
> On Mon, Nov 14, 2016 at 10:45 AM, Martin Gr=C3=A4=C3=9Flin <mgraesslin@kd=
e.org> wrote:
>> Hi framework devs,
>>
>> recently we started to see the first patches for frameworks to silence
>> warnings for not used features of C++11. In particular to add override t=
o
>> methods of inheriting classes.
>>
>> Now I find this weird from the perspective of our C++ requirements. On t=
he
>> one side we say that we are not allowed to use these features to still
>> support non-C++11 compilers on the other side we see that compilers alre=
ady
>> generate warnings if you don't use the C++11 features.
>>
>> In that particular case I do not think that Q_DECL_OVERRIDE is a solutio=
n.
>> It's an ugly hack and for the frameworks I maintain I gave a -2 on the
>> review. I think this needs a general solution of either not adding or ad=
ding
>> override, but not the Qt hack.
>>
>> I think this is a sign that we need to move on. We cannot continue with =
the
>> state we are in. It's too much a hassle for developers:
>> * false-positive compile warnings
>> * no way to check which features are allowed or not
>> * no warnings if a not allowed feature is used
>> * no CI system in place to ensure our rules
>>
>> Given that I want to suggest that we remove all compiler restrictions an=
d
>> allow the full feature set of C++11. If someone still thinks we need to
>> support the compilers not supporting C++11, I would like to see a plan o=
n
>> how we can improve the developer story, especially how to address the la=
st
>> two points in my list above.
>>
>> Opinions?
>
> The KTextEditor framework already uses e.g. override and nullptr in
> some places, and no one complained so far.
>
> Given that even in old distros like CentOS 6 with dev-toolset-3 you
> get a gcc 4.9.3 with full C++11 support, I also think we should allow
> all of C++11.
>
> Greetings
> Dominik

From a practical point of view, there's no c++11, there's what
compilers support, and what we allow is what our compilers support.

As far as I remember, our biggest restrictions were due to MSVC, I'd
say that as soon as we can revisit the compilers, we'll get to adopt
more features.

That said, I'm pretty sure we aren't testing these, so we have rules
but no ways to enforce them. I'm more concerned about that.

Aleix
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic