kcat / openal-soft

OpenAL Soft is a software implementation of the OpenAL 3D audio API.
Other
2.22k stars 536 forks source link

Does not build with C++20 #1068

Open neheb opened 1 day ago

neheb commented 1 day ago

A small glimpse:

../subprojects/openal-soft-1.24.0/core/helpers.cpp:47:15: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘const char8_t*’ [-Wformat=]
   47 |         TRACE("Searching %s for *%.*s\n", fpath.u8string().c_str(), al::sizei(ext), ext.data());
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                 |
      |                                                                 const char8_t*
../subprojects/openal-soft-1.24.0/core/logging.h:30:46: note: in definition of macro ‘TRACE’
   30 | #define TRACE(...) al_print(LogLevel::Trace, __VA_ARGS__)
      |                                              ^~~~~~~~~~~
../subprojects/openal-soft-1.24.0/core/helpers.cpp:47:27: note: format string is defined here
   47 |         TRACE("Searching %s for *%.*s\n", fpath.u8string().c_str(), al::sizei(ext), ext.data());
      |                          ~^
      |                           |
      |                           char*
      |                          %hhn
../subprojects/openal-soft-1.24.0/core/helpers.cpp:55:36: error: no matching function for call to ‘case_compare(std::u8string, const std::string_view&)’
   55 |                 && al::case_compare(entrypath.extension().u8string(), ext) == 0)

Basically, C++20 changes u8 in an incompatible way. See https://en.cppreference.com/w/cpp/language/character_literal --> 2