Cleanup FMT_STRING

This commit is contained in:
Victor Zverovich 2024-08-31 12:39:11 -07:00
parent 6797f0c39a
commit 516a2e2049
2 changed files with 15 additions and 16 deletions

View File

@ -65,8 +65,8 @@ jobs:
- name: Add repositories for older GCC - name: Add repositories for older GCC
run: | run: |
# Below repo provides GCC 4.9. # 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://dk.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 universe'
if: ${{ matrix.cxx == 'g++-4.9' }} if: ${{ matrix.cxx == 'g++-4.9' }}
- name: Add repositories for newer GCC - name: Add repositories for newer GCC

View File

@ -1874,14 +1874,13 @@ inline auto find_escape(const char* begin, const char* end)
/* Use the hidden visibility as a workaround for a GCC bug (#1973). */ \ /* Use the hidden visibility as a workaround for a GCC bug (#1973). */ \
/* Use a macro-like name to avoid shadowing warnings. */ \ /* Use a macro-like name to avoid shadowing warnings. */ \
struct FMT_VISIBILITY("hidden") FMT_COMPILE_STRING : base { \ struct FMT_VISIBILITY("hidden") FMT_COMPILE_STRING : base { \
using char_type FMT_MAYBE_UNUSED = fmt::remove_cvref_t<decltype(s[0])>; \ using char_type = fmt::remove_cvref_t<decltype(s[0])>; \
FMT_MAYBE_UNUSED FMT_CONSTEXPR explicit \ FMT_MAYBE_UNUSED FMT_CONSTEXPR explicit \
operator fmt::basic_string_view<char_type>() const { \ operator fmt::basic_string_view<char_type>() const { \
return fmt::detail_exported::compile_string_to_view<char_type>(s); \ return fmt::detail_exported::compile_string_to_view<char_type>(s); \
} \ } \
}; \ }; \
typename FMT_COMPILE_STRING::char_type FMT_CHAR = {}; \ fmt::detail::ignore_unused(typename FMT_COMPILE_STRING::char_type()); \
(void)FMT_CHAR; \
return FMT_COMPILE_STRING(); \ return FMT_COMPILE_STRING(); \
}() }()