Re: [Wesnoth-dev] Can we use C++0x/C++11 in wesnoth?
Posted by Mark de Wever on November 26, 2011 - 21:10:
On Fri, Nov 25, 2011 at 10:51:06AM -0500, Gabriel Morin wrote:
Can we already use c++0x/c++11 stuff in wesnoth? My guess is not yet, but I
noticed env.AppendUnique(CXXFLAGS = "-std=c++0x") in the SConstruct file,
so I'm wondering.
I already did some testing before  and C++11 support isn't generally
available. I redid the tests and the results with the current trunk
g++ 4.4 success failure
g++ 4.5 success success
g++ 4.6 success success
clang 2.9 success failure*
g++ 4.7** success success
*) Didn't do much investigation, clang 3.0 should be released rather
soon, so rather look at it with this version.
**) Actually the gcc-snapshot package in Debian of 20111114, but expect
the same results for g++ 4.7 once released
I'd like to use boost::make_shared for much more efficient initialization
of shared pointers, but to work properly it needs rvalue references and
variadic templates from c++11.
Variadic templates are won't be in MSVC 11 .
Those are already implemented in g++ 4.3 which is in debian stable i.e.
I haven't tested with g++ 4.3, but can't compile Wesnoth in c++0x mode
with g++ 4.4, which is the current comiler in Debian stable.
Also on the Mac there seems to be no proper C++11 support at the moment.
So I still think we should wait with using C++11 features until support
on all platforms is better.
Mark de Wever aka Mordante/SkeletonCrew
Powered by MHonArc
, Updated Tue Nov 29 11:20:02 2011