The International Simutrans Forum

Development => Patches & Projects => Topic started by: ceeac on March 11, 2020, 04:02:07 PM

Title: Fix for pre-C++11 compilers
Post by: ceeac on March 11, 2020, 04:02:07 PM
Fixes compilation when using compilers that do not enable C++11 or newer by default (or when using -std=c++03 explicitly), like the macOS nightly build (https://github.com/aburch/simutrans/runs/493303774).
Title: Re: Fix for pre-C++11 compilers
Post by: Mariculous on March 11, 2020, 04:36:16 PM
Tbh I am not quite sure why simutrans still builds against an ancient standard on macOS. Windows and Linux builds seem to target C++11.
Changing the std for macOS builds to C++11 (or even newer) should be preferred over backporting to C++03 and

This is just my opinion. Usually I don't care about macOS at all, so there might be some macOS specific pitfalls I did not consider.
Title: Re: Fix for pre-C++11 compilers
Post by: prissi on March 12, 2020, 12:59:18 PM
Since there are no newer servers for Mac OS, I have to use whatever Github offers me. Anyway, for portability not using extensions is the best.

Ok, I have rather to define the structure by hand. Stupid ...
Title: Re: Fix for pre-C++11 compilers
Post by: Dwachs on March 29, 2020, 10:25:24 AM
why is there a union anyway? Memory consumption should not be an issue here.