Page 1 of 1


Posted: 09 Jun 2017, 17:01
by Zini
We are now finally changing to C++11. New code and changes to existing code can take advantage of the new standard. Please do not go around and change old code to C++11 just because you can (unless there are specific reasons).

Note that this is only C++11. We won't make the jump to C++14 yet. C++14 support is not spread widely enough among Linux distributions (especially LTS versions) and we absolutely do not want to require people to install a new compiler for working on OpenMW.

I will update this post as we move along further the C++ standard path.

Re: C++11

Posted: 09 Jun 2017, 17:39
by psi29a
\o/ Yay!

Thanks everyone for reviewing and adding their suggestions/corrections/improvements. :)

Next step is to rebase my de-boosting branch now that we can replace many boost::* with their std::* equivalents. I've managed to cut down on compile times and still keep functionality intact.

Re: C++11

Posted: 09 Jun 2017, 18:28
by ap0
Hurray for de-boosting the code base ♥

Re: C++11

Posted: 10 Jun 2017, 08:51
by psi29a
OK, my PR is ready for review.

It removes a lot of unnecessary includes which cuts down on the time needed to parse/check by the compiler.
It replaces boost::* with std:: equivalents where available.

It does not replace boost::math::gcd because stupid msvc doesn't support it until 2017.3 P2.
Had to add a few extra #include <algorithm> because std::min/max because MSVC2013 requires it. MSVC2014 does not.

We do not touch boost's fpath because of Scrawl's concern about utf-8 paths. This has yet to be validated. This would be a big win for us if we could use std:: instead. This will be for another PR.

Re: C++11

Posted: 10 Jun 2017, 10:33
by TechNoirMK
What does moving to C++11 mean, again?

Re: C++11

Posted: 10 Jun 2017, 12:56
by raven
TechNoirMK wrote:
10 Jun 2017, 10:33
What does moving to C++11 mean, again?
As seen in the above posts, the std lib offers much more functionality, reduces external dependencies.

C++11 is overall a much nicer language to work with, has a lot of improvements in all areas: