g++ defaults to the C++ standard of 2003. 2 years ago a new standard
has been published with a log of improvements.
We've been using selected features from C++11 for a while now, and we are
very happy with the improvements. Features like strongly typed enums
are worth the switch alone.
Today the g++ commands in the build process of lilypond do not specify
any standard so that it defaults to c++03.
Could we switch to c++11?
Well if you want full c++11 you're gonna have to use gcc 4.8(.1) which is probably
a bit too close to the edge for most people/distributions. You could look at this page
and figure out which features you want to use and what minimum version of the compiler
you want to support:
I suspect that a test would be required. Can somebody tell me where I
should add the option -std=c++11 to test this?
For example, can I just replace the following line of aclocal.m4:
CFLAGS=" -pipe $CFLAGS"
by
CFLAGS=" -pipe -std=c++11 $CFLAGS"
CXXFLAGS would be the place to put that flag.... on an autotoolized build you could
just run
CXXFLAGS="..." ./configure ...
Be prepared for lots of deprecated warnings because even std::auto_ptr should
be replaced by std::unique_ptr.
Immanuel