RFC: Move to C++14

Daniel van Vugt daniel.van.vugt at canonical.com
Wed Feb 18 01:39:18 UTC 2015


I think this is a bad idea.

Supporting trusty with the latest Mir is presently easy, as demonstrated:
https://code.launchpad.net/~vanvugt/mir/revive-trusty/+merge/249789

Using newer language specs I think is contrary to engineering maturity. 
Because it means we knowingly and needlessly reduce the number of 
distros Mir can support. And we also make the learning curve for people 
even steeper (fewer C++ developers know the new language features).

Overall this will lead to reduced adoption by users and reduced 
participation by developers. We need to be careful and draw the line 
somewhere... stop upgrading to the latest C++ every time one comes along.

- Daniel


On 17/02/15 20:37, Alexandros Frantzis wrote:
> Hi all,
>
> I think it's to time to consider moving from C++11 to C++14 (at least
> the C++14 features our compilers support). C++14 offers some useful
> improvements over C++11, like:
>
> * std::make_unique()
> * standard literal suffixes for std::chrono (e.g. auto delay = 10ms;)
> * std::shared_timed_mutex (aka RW mutex)
> * generic lambdas
> * lambda capture initializers (which, importantly, allow moving values into
>    lambdas)
>
> Moving to C++14 means that we will not be able to build Mir on a
> pristine Ubuntu LTS 14.04 system. Note that, even now, Mir cannot be
> fully built on the LTS because of changes in the Android interfaces. As
> things currently stand, I believe that dropping support for 14.04 builds
> in order to allow C++14 is a worthy trade-off.
>
> In addition, not supporting 14.04 builds means that we will be able to
> use all the new features of other libraries we depend on, e.g.
> gmock/gtest.
>
> It's also worth noting that our packages depend on g++-4.9 (which
> supports the C++14 features we want).
>
> I have published an MP introducing C++14 into our codebase:
>
> https://code.launchpad.net/~afrantzis/mir/introduce-c++14/+merge/249988
>
> Let me know what you think.
>
> Thanks,
> Alexandros
>



More information about the Mir-devel mailing list