C++11

Everything about development and the OpenMW source code.
Post Reply
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

C++11

Post by Zini »

I was originally planing to do the move to C++11 later this year. But some people are getting overly excited about C++11 it seems and that is already causing problems. So lets get it out of the way now. But in an orderly way, please!

These are the steps we have to take:

1. Determine which minimum compiler versions we can except.

2. Determine a common subset of C++11 features for these compilers.

3. Adjust the compiler settings accordingly.


Starting with #1:

gcc: That would be 4.6, the version for the current Ubuntu/Mint LTS. Anything newer is out of question. Do we need to consider anything older for any Linux distribution?

MSVC: No idea? 2010? 2012?

CLang: No idea either.
Chris
Posts: 1626
Joined: 04 Sep 2011, 08:33

Re: C++11

Post by Chris »

Zini wrote:gcc: That would be 4.6, the version for the current Ubuntu/Mint LTS. Anything newer is out of question. Do we need to consider anything older for any Linux distribution?
Unless it's changed in the last couple of days, Gentoo stable is on 4.5.4 (there've been quite a few reported problems with 4.6, which is why I assume they haven't updated yet). I haven't been having any problems building the code though, so I assume any C++11 that's snuck in is supported here.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: C++11

Post by Zini »

Thanks. gcc 4.5.4 it is then. We still need to hear about the two other compilers.
User avatar
psi29a
Posts: 5360
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: C++11

Post by psi29a »

Current Ubuntu (12.10) GCC is 4.7.2 ...
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: C++11

Post by Ace (SWE) »

MSVC 2010 is the one that I see mostly used today, but having support for 2008 would probably be a good idea too.
Toc1r
Posts: 7
Joined: 07 Jan 2013, 12:48

Re: C++11

Post by Toc1r »

for clang i'd go with 3.0. debian stable is still at (ancient) 2.7 for some reason but they also have 3.0 in testing. ubuntu has 3.0 also in a couple older distros. arch is at 3.3 and i guess many of the clang users are compiling it themselves anyway...
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: C++11

Post by Zini »

for clang i'd go with 3.0. debian stable is still at (ancient) 2.7 for some reason but they also have 3.0 in testing. ubuntu has 3.0 also in a couple older distros. arch is at 3.3 and i guess many of the clang users are compiling it themselves anyway...
I think we mostly need input from the OS X guys for that.
MSVC 2010 is the one that I see mostly used today, but having support for 2008 would probably be a good idea too.
From what I see 2008 has barely any support for C++11 at all (not surprising). If we need to provide support for 2008, we should drop C++11 completely. How important is 2008? Do we actually force any active or semi-active developer to change his tools by making 2010 the minimum?
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: C++11

Post by Ace (SWE) »

I would say that forcing new developers to use MSVC 2010 would be acceptable, but I'm sure there are people that disagree.
User avatar
AngleBracket
Posts: 32
Joined: 01 Jan 2013, 02:53

Re: C++11

Post by AngleBracket »

Ace (SWE) wrote:I would say that forcing new developers to use MSVC 2010 would be acceptable, but I'm sure there are people that disagree.
There's really no reason to support 2008, Visual C++ 2010 Express is freely available and is fine for the purposes of working on OpenMW. There's also the option of QtCreator with the MSVC 2010 toolchain if they don't like VS express.
User avatar
jvoisin
Posts: 303
Joined: 11 Aug 2011, 18:47
Contact:

Re: C++11

Post by jvoisin »

Please think about the current debian stable: gcc 4:4.4.5-1
Altough since the next stable will be released soon, we may envisage gcc 4:4.7.2-1 (if you want to support debian stable of course)
Post Reply