From 7ae6b317f3325bf722773ba7e5855c37811b3388 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 26 Oct 2022 15:52:18 +0300 Subject: [PATCH] Only disable C4351 on msvc-12.0 and earlier (refs #96) --- include/boost/system/detail/error_category.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/system/detail/error_category.hpp b/include/boost/system/detail/error_category.hpp index 6185423..40b65f4 100644 --- a/include/boost/system/detail/error_category.hpp +++ b/include/boost/system/detail/error_category.hpp @@ -48,7 +48,7 @@ class std_category; #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" #endif -#if defined(BOOST_MSVC) +#if defined(BOOST_MSVC) && BOOST_MSVC < 1900 #pragma warning(push) #pragma warning(disable: 4351) // new behavior: elements of array will be default initialized #endif @@ -183,7 +183,7 @@ public: #endif }; -#if defined(BOOST_MSVC) +#if defined(BOOST_MSVC) && BOOST_MSVC < 1900 #pragma warning(pop) #endif