From ae2a85c3f05e1f8587c05b48888f8d80d9b5b849 Mon Sep 17 00:00:00 2001 From: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> Date: Tue, 21 Nov 2023 21:47:13 -0600 Subject: [PATCH] Suppress a msvc warning --- include/cpptrace/cpptrace.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/cpptrace/cpptrace.hpp b/include/cpptrace/cpptrace.hpp index a879954..1717dfb 100644 --- a/include/cpptrace/cpptrace.hpp +++ b/include/cpptrace/cpptrace.hpp @@ -27,6 +27,13 @@ #define CPPTRACE_FORCE_NO_INLINE __attribute__((noinline)) #endif +#if _MSC_VER +#pragma warning(push) +// warning C4251: using non-dll-exported type in dll-exported type, firing on std::vector and others for some +// reason +#pragma warning(disable: 4251) +#endif + namespace cpptrace { struct object_trace; struct stacktrace; @@ -408,4 +415,8 @@ namespace cpptrace { } \ } () +#if _MSC_VER +#pragma warning(pop) +#endif + #endif