C++11

Everything about development and the OpenMW source code.
User avatar
Jyby
Posts: 408
Joined: 10 Dec 2013, 04:16

Re: C++11

Post by Jyby »

Can this be a 0.32.0 thing? We should move towards this.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: C++11

Post by Zini »

There is still no progress on the Linux side of things.
User avatar
EmperorArthur
Posts: 33
Joined: 17 May 2014, 07:52

Re: C++11

Post by EmperorArthur »

Can confirm c++11 compiles on Debian jessie. gcc version 4.9.1 (Debian 4.9.1-4)

I have a patch for niffile.cpp waiting on c++11. It converts recordFactories into a std::map, and uses the find function instead of our current method of manual string compare until a match is found. The problem is the only way I could find to initialize the map was with a braced initializer list, which only works in c++11. :(
Chris
Posts: 1626
Joined: 04 Sep 2011, 08:33

Re: C++11

Post by Chris »

EmperorArthur wrote:I have a patch for niffile.cpp waiting on c++11. It converts recordFactories into a std::map, and uses the find function instead of our current method of manual string compare until a match is found. The problem is the only way I could find to initialize the map was with a braced initializer list, which only works in c++11. :(
You can also use a function to initialize it. Like this:
https://github.com/OpenMW/openmw/blob/m ... n.cpp#L139
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: C++11

Post by sirherrbatka »

*cough* *cough*

Can someone remind me what is holding us from using C++11?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: C++11

Post by Zini »

Not much. But don't want to change too many things at the same time. We will move to C++11 after the OSG port is done.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: C++11

Post by sirherrbatka »

That makes sense. Thanks for answer.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: C++11

Post by Zini »

Started to look into the C++11 transition again.

I found a section the cmake scripts that checks for g++ 4.6 or newer. I presume that is just a leftover. Or does anyone still uses a g++ older than 4.6? That would seriously limit our options.

Also, what is the oldest version of boost we still need to support? Anything older than 1.51 still in use?
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 »

Zini wrote:Also, what is the oldest version of boost we still need to support? Anything older than 1.51 still in use?
Well... because travis-ci requires precise, we're still using its default boost libraries.

- Boost version: 1.46.1

-- The CXX compiler identification is GNU 4.6.3
-- The C compiler identification is GNU 4.6.3
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: C++11

Post by Zini »

No problem. I can deal with the boost issue. I guess no one depends on anything older? Then I can as well throw out the check for 4.6.
Post Reply