diff --git a/include/outcome/basic_outcome.hpp b/include/outcome/basic_outcome.hpp index 02ff82eabc..508126e2a5 100644 --- a/include/outcome/basic_outcome.hpp +++ b/include/outcome/basic_outcome.hpp @@ -37,6 +37,11 @@ Distributed under the Boost Software License, Version 1.0. #pragma clang diagnostic ignored "-Wdocumentation" // Standardese markup confuses clang #endif +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(push) +#pragma warning(disable : 6287) // redundant code +#endif + OUTCOME_V2_NAMESPACE_EXPORT_BEGIN template // @@ -1139,6 +1144,10 @@ SIGNATURE NOT RECOGNISED OUTCOME_V2_NAMESPACE_END +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(pop) +#endif + #ifdef __clang__ #pragma clang diagnostic pop #endif diff --git a/include/outcome/basic_result.hpp b/include/outcome/basic_result.hpp index 880c359b3a..858f31320b 100644 --- a/include/outcome/basic_result.hpp +++ b/include/outcome/basic_result.hpp @@ -38,6 +38,11 @@ Distributed under the Boost Software License, Version 1.0. #pragma clang diagnostic ignored "-Wdocumentation" // Standardese markup confuses clang #endif +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(push) +#pragma warning(disable: 6287) // redundant code +#endif + OUTCOME_V2_NAMESPACE_EXPORT_BEGIN template // @@ -755,6 +760,10 @@ static_assert(std::is_standard_layout