blobbyvolley2 icon indicating copy to clipboard operation
blobbyvolley2 copied to clipboard

Moving to C++14

Open ngc92 opened this issue 3 years ago • 4 comments

Can we increase the minimum compiler requirements to having C++14 support, or are we targeting a platform where that is not possible? Would give us e.g. std::make_unique, to finally get rid of all the explicit new still going on in the code.

ngc92 avatar Sep 09 '22 17:09 ngc92

All "official" targets now support C++14, so except for the theoretical case of someone else compiling for a platform with old compilers, there is nothing wrong with doing so.

Feel free to switch to C++14 if there is a good reason in your opinion.

danielknobe avatar Sep 09 '22 18:09 danielknobe

It seems that the code in its current state is in any case no longer compatible with very old versions of GCC (the codeconventions document claims 4.6, but builds fail with 5.0) https://github.com/danielknobe/blobbyvolley2/runs/8284234768?check_suite_focus=true

The oldest gcc that currently appears to work is GCC-6: https://github.com/danielknobe/blobbyvolley2/runs/8284344973?check_suite_focus=true which I think already as full C++14 support. Edit: Yes, g++-6 actually made -std=gnu++14 the default mode.

ngc92 avatar Sep 10 '22 11:09 ngc92

Update: The oldest gcc that currently appears to work is GCC-5 With minor changes we can get GCC-4 up and running. We decided to not support GCC-4 anymore.

If we want to switch to C++14 we need some good reasons. I think std::make_unique is not a game changer.

danielknobe avatar Sep 22 '22 14:09 danielknobe

I think the only open issues for 1.1 are #106 & #124 . We can fix both by moving union3. Since it is your bot you can better judge if this should be done.

More important: In my opinion the bots in stupid mode are to strong. A beginner will be very frustrated.

danielknobe avatar Jun 10 '23 19:06 danielknobe