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()};
|
return {s.data(), s.size()};
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FMT_STRING_IMPL(s, base) \
|
#if defined(FMT_GCC_VERSION) && FMT_GCC_VERSION >= 400
|
||||||
[] { \
|
# define FMT_COMPILE_STRING_VISIBILITY_ATTRIBUTE \
|
||||||
/* Use a macro-like name to avoid shadowing warnings. */ \
|
__attribute__((visibility("hidden")))
|
||||||
struct FMT_COMPILE_STRING : base { \
|
#else
|
||||||
using char_type = fmt::remove_cvref_t<decltype(s[0])>; \
|
# define FMT_COMPILE_STRING_VISIBILITY_ATTRIBUTE
|
||||||
FMT_MAYBE_UNUSED FMT_CONSTEXPR \
|
#endif
|
||||||
operator fmt::basic_string_view<char_type>() const { \
|
|
||||||
return fmt::detail::compile_string_to_view<char_type>(s); \
|
#define FMT_STRING_IMPL(s, base) \
|
||||||
} \
|
[] { \
|
||||||
}; \
|
/* Use a macro-like name to avoid shadowing warnings. */ \
|
||||||
return FMT_COMPILE_STRING(); \
|
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