diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 29b2a6e9..1bbfee8f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -65,8 +65,8 @@ jobs: - name: Add repositories for older GCC run: | # Below repo provides GCC 4.9. - sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ xenial main' - sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ xenial universe' + sudo apt-add-repository 'deb http://dk.archive.ubuntu.com/ubuntu/ xenial main' + sudo apt-add-repository 'deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe' if: ${{ matrix.cxx == 'g++-4.9' }} - name: Add repositories for newer GCC diff --git a/include/fmt/format.h b/include/fmt/format.h index c7d75fd1..77797801 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1869,20 +1869,19 @@ inline auto find_escape(const char* begin, const char* end) return result; } -#define FMT_STRING_IMPL(s, base) \ - [] { \ - /* Use the hidden visibility as a workaround for a GCC bug (#1973). */ \ - /* Use a macro-like name to avoid shadowing warnings. */ \ - struct FMT_VISIBILITY("hidden") FMT_COMPILE_STRING : base { \ - using char_type FMT_MAYBE_UNUSED = fmt::remove_cvref_t; \ - FMT_MAYBE_UNUSED FMT_CONSTEXPR explicit \ - operator fmt::basic_string_view() const { \ - return fmt::detail_exported::compile_string_to_view(s); \ - } \ - }; \ - typename FMT_COMPILE_STRING::char_type FMT_CHAR = {}; \ - (void)FMT_CHAR; \ - return FMT_COMPILE_STRING(); \ +#define FMT_STRING_IMPL(s, base) \ + [] { \ + /* Use the hidden visibility as a workaround for a GCC bug (#1973). */ \ + /* Use a macro-like name to avoid shadowing warnings. */ \ + struct FMT_VISIBILITY("hidden") FMT_COMPILE_STRING : base { \ + using char_type = fmt::remove_cvref_t; \ + FMT_MAYBE_UNUSED FMT_CONSTEXPR explicit \ + operator fmt::basic_string_view() const { \ + return fmt::detail_exported::compile_string_to_view(s); \ + } \ + }; \ + fmt::detail::ignore_unused(typename FMT_COMPILE_STRING::char_type()); \ + return FMT_COMPILE_STRING(); \ }() /**