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