C++11

Matěj Laitl matej at laitl.cz
Thu May 9 22:39:12 UTC 2013


On 8. 5. 2013 Patrick von Reth wrote:
> For the official builds we are still using gcc 4.4.7 and we probably won't
> switch to 4.8 before we switch to qt5. But for a amarok only build, I
> already did some testing and got a working build with gcc 4.8. For msvc, we
> are currently using msvc10, and won't switch to msvc12(which has c++11
> support) before we switch to qt5. Cheers

So I think this is the answer: C++11 only as soon Windows guys will support 
it.

Markey wrote:
> I'm sometimes doing little experiments with C++11 usage in Amarok,
> just to see how much it could improve our code. When I was hacking on
> this crash workaround for the Wikipedia applet, I found the code
> particularly awkward to work with. Lots of redundancy.

I also agree that we should allow & use C++11 as soon it wouldn't raise the 
bar for compiling Amarok from source. (which seems to be by the time when more 
projects start to use Qt5) Do we know other OSS projects starting to require 
C++11?

Another (and IMO important) benefit of C++11 is make-coding-fun one. Trying new 
things is fun and C++11 is sexy, perhaps Markey would enjoy coding on Amarok 
much more if he could use C++11.

> With some Lambda usage, it becomes a good deal more readable and
> pleasant to work with, and less error prone. This is how it could look
> instead:
> 
> From 7cca04eb25169e5befb3e5d6a1290795c3e651b8 Mon Sep 17 00:00:00 2001
> From: Mark Kretschmann <kretschmann at kde.org>
> Date: Thu, 9 May 2013 19:08:24 +0200
> Subject: [PATCH] Replace redundant code with one Lambda function.

This change doesn't really need a lambda support at all, just deduplicate the 
code into a helper function, it is only slightly less elegant. Please do it.

On the other hand, you haven't use all the power of lambdas - you wouldn't 
need to provide "wiki" as an argument, but instead use a closure to catch it 
directly in the lambda definition.

	Matěj


More information about the Amarok-devel mailing list