Fedora 44 updates the GNU toolchain from gcc 15.2 to gcc 16.0.1. This causes build failures on master using F44 citing no known conversion for argument 1 from ‘std::u8string’, when it builds without issue on F43.
/home/username/git/daid/emptyepsilon-compile/EmptyEpsilon/src/packResourceProvider.cpp:95:87: error: no matching function for call to ‘string::string(<brace-enclosed initializer list>)’
95 | if (!entry.is_directory() && string { entry.path().extension().u8string() }.lower() == ".pack")
| ^
• there are 11 candidates
In file included from /home/username/git/daid/emptyepsilon-compile/SeriousProton/src/resources.h:4,
from /home/username/git/daid/emptyepsilon-compile/EmptyEpsilon/src/packResourceProvider.h:4,
from /home/username/git/daid/emptyepsilon-compile/EmptyEpsilon/src/packResourceProvider.cpp:1:
• candidate 1: ‘string::string(float, int)’
/home/username/git/daid/emptyepsilon-compile/SeriousProton/src/stringImproved.h:47:5:
47 | string(const float nr, int decimals = 2) : std::string()
| ^~~~~~
• no known conversion for argument 1 from ‘std::u8string’ {aka ‘std::__cxx11::basic_string<char8_t>’} to ‘float’
/home/username/git/daid/emptyepsilon-compile/SeriousProton/src/stringImproved.h:47:24:
47 | string(const float nr, int decimals = 2) : std::string()
| ~~~~~~~~~~~~^~
• candidate 2: ‘string::string(unsigned int)’
/home/username/git/daid/emptyepsilon-compile/SeriousProton/src/stringImproved.h:40:5:
40 | string(const unsigned int nr) : std::string()
| ^~~~~~
• no known conversion for argument 1 from ‘std::u8string’ {aka ‘std::__cxx11::basic_string<char8_t>’} to ‘unsigned int’
/home/username/git/daid/emptyepsilon-compile/SeriousProton/src/stringImproved.h:40:31:
40 | string(const unsigned int nr) : std::string()
| ~~~~~~~~~~~~~~~~~~~^~
...
This appears to be related to C++20 changes: ToruNiina/toml11#104
GCC 16 changes the default language version from gnu++17 to gnu++20.
- Replacing
u8string() and generic_u8string() calls with string() and generic_string() in EmptyEpsilon packResourceProvider.cpp and SeriousProton resources.cpp silences the errors, but it's unclear if those changes would affect cross-platform compatibility.
- Specifying
-std=gnu++17 via CMake target_compile_options in both EmptyEpsilon and SeriousProton also silences the errors.
Fedora 44 updates the GNU toolchain from gcc 15.2 to gcc 16.0.1. This causes build failures on
masterusing F44 citingno known conversion for argument 1 from ‘std::u8string’, when it builds without issue on F43.This appears to be related to C++20 changes: ToruNiina/toml11#104
GCC 16 changes the default language version from
gnu++17tognu++20.u8string()andgeneric_u8string()calls withstring()andgeneric_string()in EmptyEpsilonpackResourceProvider.cppand SeriousProtonresources.cppsilences the errors, but it's unclear if those changes would affect cross-platform compatibility.-std=gnu++17via CMaketarget_compile_optionsin both EmptyEpsilon and SeriousProton also silences the errors.