From cea5d70dc0eb67a9d9bb6f4a5783523147edb4f2 Mon Sep 17 00:00:00 2001 From: Jonas Hoppe <162709928+czjhoppe@users.noreply.github.com> Date: Fri, 30 Aug 2024 13:33:16 +0200 Subject: [PATCH] [msvc][fix] disable C4702 unreachable code --- src/core/include/mp-units/bits/fmt.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/core/include/mp-units/bits/fmt.h b/src/core/include/mp-units/bits/fmt.h index c4572a9c..b12058b6 100644 --- a/src/core/include/mp-units/bits/fmt.h +++ b/src/core/include/mp-units/bits/fmt.h @@ -48,6 +48,12 @@ import std; #endif #endif + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4702) +#endif + // most of the below code is based on/copied from fmtlib namespace mp_units::detail { @@ -390,4 +396,9 @@ template } } // namespace mp_units::detail + +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + // NOLINTEND(cppcoreguidelines-pro-bounds-pointer-arithmetic, cppcoreguidelines-pro-type-union-access)