mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Fix clang -Wdisabled-macro-expansion warning from FMT_STRING_IMPL.
FMT_STRING_IMPL has an internal helper named FMT_STRING, however FMT_STRING is also the name of the macro that invokes FMT_STRING_IMPL. Renaming this helper avoids the appearance of a recursive macro.
This commit is contained in:
parent
8a06ca84c7
commit
29a1ea795a
@ -3547,7 +3547,7 @@ FMT_END_NAMESPACE
|
|||||||
#define FMT_STRING_IMPL(s, ...) \
|
#define FMT_STRING_IMPL(s, ...) \
|
||||||
[] { \
|
[] { \
|
||||||
/* Use a macro-like name to avoid shadowing warnings. */ \
|
/* Use a macro-like name to avoid shadowing warnings. */ \
|
||||||
struct FMT_STRING : fmt::compile_string { \
|
struct FMT_COMPILE_STRING : fmt::compile_string { \
|
||||||
using char_type = fmt::remove_cvref_t<decltype(*s)>; \
|
using char_type = fmt::remove_cvref_t<decltype(*s)>; \
|
||||||
__VA_ARGS__ FMT_CONSTEXPR \
|
__VA_ARGS__ FMT_CONSTEXPR \
|
||||||
operator fmt::basic_string_view<char_type>() const { \
|
operator fmt::basic_string_view<char_type>() const { \
|
||||||
@ -3555,7 +3555,7 @@ FMT_END_NAMESPACE
|
|||||||
return fmt::internal::literal_to_view(s); \
|
return fmt::internal::literal_to_view(s); \
|
||||||
} \
|
} \
|
||||||
}; \
|
}; \
|
||||||
return FMT_STRING(); \
|
return FMT_COMPILE_STRING(); \
|
||||||
}()
|
}()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user