From b84453a0997feaf4a5d9f66ea138cbc2cbb3b74f Mon Sep 17 00:00:00 2001 From: Patrick Urbanke Date: Sun, 3 Dec 2023 20:16:42 +0100 Subject: [PATCH] Disable false positives in MSVC compilation --- include/rfl.hpp | 10 ++++++++++ include/rfl/internal/get_field_name_ptrs.hpp | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/include/rfl.hpp b/include/rfl.hpp index 75b0662e..5f5665eb 100644 --- a/include/rfl.hpp +++ b/include/rfl.hpp @@ -1,6 +1,12 @@ #ifndef RFL_RFL_HPP_ #define RFL_RFL_HPP_ +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4244) +#pragma warning(disable : 4101) +#endif + #include "rfl/AllOf.hpp" #include "rfl/AnyOf.hpp" #include "rfl/Box.hpp" @@ -40,4 +46,8 @@ #include "rfl/to_named_tuple.hpp" #include "rfl/visit.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#endif + #endif diff --git a/include/rfl/internal/get_field_name_ptrs.hpp b/include/rfl/internal/get_field_name_ptrs.hpp index 765fb8a3..f5af0c56 100644 --- a/include/rfl/internal/get_field_name_ptrs.hpp +++ b/include/rfl/internal/get_field_name_ptrs.hpp @@ -1126,4 +1126,8 @@ constexpr auto get_field_name_ptrs() { } // namespace internal } // namespace rfl +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + #endif