Merge pull request #10740 from Tilka/cxx20

Move to C++20 for non-MSVC compilers
This commit is contained in:
Mai 2022-08-04 09:31:31 -04:00 committed by GitHub
commit f59f1a2a35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -2198,7 +2198,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& fp,
-> OutputIt { -> OutputIt {
auto significand = fp.significand; auto significand = fp.significand;
int significand_size = get_significand_size(fp); int significand_size = get_significand_size(fp);
static constexpr Char zero = static_cast<Char>('0'); const Char zero = static_cast<Char>('0');
auto sign = fspecs.sign; auto sign = fspecs.sign;
size_t size = to_unsigned(significand_size) + (sign ? 1 : 0); size_t size = to_unsigned(significand_size) + (sign ? 1 : 0);
using iterator = reserve_iterator<OutputIt>; using iterator = reserve_iterator<OutputIt>;

View File

@ -18,7 +18,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows")
endif() endif()
if (NOT MSVC) if (NOT MSVC)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_EXTENSIONS OFF)
endif() endif()

View File

@ -195,7 +195,7 @@ std::vector<std::string> GetCDDevices()
{ {
for (unsigned int j = checklist[i].num_min; j <= checklist[i].num_max; ++j) for (unsigned int j = checklist[i].num_min; j <= checklist[i].num_max; ++j)
{ {
std::string drive = fmt::format(checklist[i].format, j); std::string drive = fmt::format(fmt::runtime(checklist[i].format), j);
if (IsCDROM(drive)) if (IsCDROM(drive))
{ {
drives.push_back(std::move(drive)); drives.push_back(std::move(drive));

View File

@ -291,7 +291,7 @@ void GameFile::DownloadDefaultCover()
} }
Common::HttpRequest request; Common::HttpRequest request;
constexpr char cover_url[] = "https://art.gametdb.com/wii/cover/{}/{}.png"; static constexpr char cover_url[] = "https://art.gametdb.com/wii/cover/{}/{}.png";
const auto response = request.Get(fmt::format(cover_url, region_code, m_gametdb_id)); const auto response = request.Get(fmt::format(cover_url, region_code, m_gametdb_id));
if (!response) if (!response)