mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-09 21:00:06 +00:00
Cleanup FMT_STRING
This commit is contained in:
parent
6797f0c39a
commit
516a2e2049
4
.github/workflows/linux.yml
vendored
4
.github/workflows/linux.yml
vendored
@ -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
|
||||||
|
@ -1869,20 +1869,19 @@ inline auto find_escape(const char* begin, const char* end)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FMT_STRING_IMPL(s, base) \
|
#define FMT_STRING_IMPL(s, base) \
|
||||||
[] { \
|
[] { \
|
||||||
/* 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(); \
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user