>From a0f6fb6b0cb52a1dd48b362e79de40110232e8dd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 25 Apr 2017 19:23:28 +0200 Subject: [PATCH] Disable MSVC warnings in bourn_cast.hpp Use compiler-specific pragmas to avoid unavoidable (or, at least, difficult to avoid), but known to be harmless here, warnings about signed/unsigned and boolean comparisons with MSVC, just as we already do it for gcc/clang. --- bourn_cast.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bourn_cast.hpp b/bourn_cast.hpp index 2121286..d3162ac 100644 --- a/bourn_cast.hpp +++ b/bourn_cast.hpp @@ -38,7 +38,11 @@ # if 5 <= __GNUC__ # pragma GCC diagnostic ignored "-Wbool-compare" # endif // 5 <= __GNUC__ -#endif // defined __GNUC__ +#elif defined LMI_MSC +# pragma warning(push) +# pragma warning(disable : 4018) +# pragma warning(disable : 4804) +#endif // defined LMI_MSC /// Floating to floating. /// @@ -237,7 +241,9 @@ inline To bourn_cast(From from, std::true_type, std::true_type) #if defined __GNUC__ # pragma GCC diagnostic pop -#endif // defined __GNUC__ +#elif defined LMI_MSC +# pragma warning(pop) +#endif // defined LMI_MSC /// Numeric stinted cast, across whose bourn no value is returned. /// -- 2.8.0.rc1