C++11
- EmperorArthur
- Posts: 33
- Joined: 17 May 2014, 07:52
Re: C++11
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.
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.
Re: C++11
You can also use a function to initialize it. Like this: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.
https://github.com/OpenMW/openmw/blob/m ... n.cpp#L139
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: C++11
*cough* *cough*
Can someone remind me what is holding us from using C++11?
Can someone remind me what is holding us from using C++11?
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: C++11
That makes sense. Thanks for answer.
Re: C++11
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?
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?
- psi29a
- Posts: 5361
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: C++11
Well... because travis-ci requires precise, we're still using its default boost libraries.Zini wrote:Also, what is the oldest version of boost we still need to support? Anything older than 1.51 still in use?
- Boost version: 1.46.1
-- The CXX compiler identification is GNU 4.6.3
-- The C compiler identification is GNU 4.6.3