From 0802941d4f7a7a41fae3128590e8154bb5972389 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 2 Sep 2013 19:25:14 -0700 Subject: [PATCH] Disable MSVC "secure" warnings in format.h only. --- format.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/format.h b/format.h index 2aa6d3e9..12685608 100644 --- a/format.h +++ b/format.h @@ -54,6 +54,12 @@ # define FMT_NOEXCEPT(expr) #endif +// Disable MSVC "secure" warnings. +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4996) +#endif + namespace fmt { namespace internal { @@ -1567,4 +1573,9 @@ void BasicFormatter::DoFormat() { } } +// Restore MSVC "secure" warnings. +#ifdef FMT_RESTORE_SECURE_WARNINGS +# pragma warning(pop) +#endif + #endif // FORMAT_H_