mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 06:21:00 +00:00
Suppress shadowing warnings
This commit is contained in:
parent
466386d5cd
commit
07f8ffc44f
@ -58,6 +58,10 @@
|
||||
# define FMT_CATCH(x) if (false)
|
||||
#endif
|
||||
|
||||
// Disable the warning about declaration shadowing because it affects too
|
||||
// many valid cases.
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4127) // conditional expression is constant
|
||||
|
14
fmt/format.h
14
fmt/format.h
@ -3766,6 +3766,13 @@ operator"" _a(const wchar_t *s, std::size_t) { return {s}; }
|
||||
} // namespace fmt
|
||||
#endif // FMT_USE_USER_DEFINED_LITERALS
|
||||
|
||||
#ifdef FMT_HEADER_ONLY
|
||||
# define FMT_FUNC inline
|
||||
# include "format.cc"
|
||||
#else
|
||||
# define FMT_FUNC
|
||||
#endif
|
||||
|
||||
// Restore warnings.
|
||||
#if FMT_GCC_VERSION >= 406
|
||||
# pragma GCC diagnostic pop
|
||||
@ -3775,11 +3782,4 @@ operator"" _a(const wchar_t *s, std::size_t) { return {s}; }
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifdef FMT_HEADER_ONLY
|
||||
# define FMT_FUNC inline
|
||||
# include "format.cc"
|
||||
#else
|
||||
# define FMT_FUNC
|
||||
#endif
|
||||
|
||||
#endif // FMT_FORMAT_H_
|
||||
|
Loading…
Reference in New Issue
Block a user