To C++11 or not?

Luigi Toscano luigi.toscano at tiscali.it
Fri Dec 30 11:24:38 UTC 2016


Il 30 dicembre 2016 10:30:22 CET, Kevin Funk <kfunk at kde.org> ha scritto:

>Following-up on this thread, since I saw some more discussion about
>C++11 
>usage in this RR: 
>  https://git.reviewboard.kde.org/r/129724/
>
>Let's put this into some concrete actions, finally. I think we all
>agree 
>nullptr & override are probably the most apparent issues (since
>compilers 
>started to warn about both), and *having* 'override' is actually super
>useful 
>for preventing programmer faults.
>
>Let's just speak about allowing nullptr & override, allowing the full
>set of C
>++11 is *not* feasible. Reason: Lot's of C++11 feature are only
>available only 
>in MSVC2015, so we'd just be able to support the latest VS. See [2].
>
>Looking at [1] I still see we list GCC 4.5 as minimum requirement.
>That's 
>pretty ancient. 4.5.1 got released Jul 2010 [3]
>
>If we raise that to GCC 4.6 (4.6.0 being released Mar 2011), we can use
>
>'nullptr' unconditionally. ktexteditor already did that in public
>headers for 
>quite some time -- no-one complained.
>
>If we raise that to GCC 4.7 (4.7.0 being released Mar 2012), we can use
>
>'override' unconditionally *.
>
>We already use MSVC2012 as min VS dep, this version has full nullptr & 
>override support. I don't see anyone using MSVC2010 for compiling KF5
>to be 
>honest...
>
>Proposal for [1]:
>- Raise min GCC version to 4.7
>- Allow to use override unconditionally
>- Allow to use nullptr unconditonally
>
>ACK?
>
>
>PS: I can do the work, I can script the refactoring with clang-tidy.
>
>Let's move forward please.

Hi, this is a really good analysis (also for future reference). In order to complete it, given that the original idea was "follow Qt's requirement", and that we increased in time the required version of Qt, what is the current status regarding compilers and Qt?

Ciao

-- 
Luigi


More information about the Kde-frameworks-devel mailing list