actual fix to eliminate warnings
This commit is contained in:
parent
574cd279bb
commit
fe11777d78
@ -3198,17 +3198,24 @@ FMT_CONSTEXPR basic_string_view<Char> compile_string_to_view(
|
||||
return {s.data(), s.size()};
|
||||
}
|
||||
|
||||
#define FMT_STRING_IMPL(s, base) \
|
||||
[] { \
|
||||
/* Use a macro-like name to avoid shadowing warnings. */ \
|
||||
struct FMT_COMPILE_STRING : base { \
|
||||
using char_type = fmt::remove_cvref_t<decltype(s[0])>; \
|
||||
FMT_MAYBE_UNUSED FMT_CONSTEXPR \
|
||||
operator fmt::basic_string_view<char_type>() const { \
|
||||
return fmt::detail::compile_string_to_view<char_type>(s); \
|
||||
} \
|
||||
}; \
|
||||
return FMT_COMPILE_STRING(); \
|
||||
#if defined(FMT_GCC_VERSION) && FMT_GCC_VERSION >= 400
|
||||
# define FMT_COMPILE_STRING_VISIBILITY_ATTRIBUTE \
|
||||
__attribute__((visibility("hidden")))
|
||||
#else
|
||||
# define FMT_COMPILE_STRING_VISIBILITY_ATTRIBUTE
|
||||
#endif
|
||||
|
||||
#define FMT_STRING_IMPL(s, base) \
|
||||
[] { \
|
||||
/* Use a macro-like name to avoid shadowing warnings. */ \
|
||||
struct FMT_COMPILE_STRING_VISIBILITY_ATTRIBUTE FMT_COMPILE_STRING : base { \
|
||||
using char_type = fmt::remove_cvref_t<decltype(s[0])>; \
|
||||
FMT_MAYBE_UNUSED FMT_CONSTEXPR \
|
||||
operator fmt::basic_string_view<char_type>() const { \
|
||||
return fmt::detail::compile_string_to_view<char_type>(s); \
|
||||
} \
|
||||
}; \
|
||||
return FMT_COMPILE_STRING(); \
|
||||
}()
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user