From 273fa0ab2601f91683a73524470aa4a1e870d42d Mon Sep 17 00:00:00 2001 From: Dan Lipsa Date: Tue, 16 Oct 2018 11:43:32 -0400 Subject: [PATCH] Remove warning in Visual Studio (#235) The following warning is removed: Visual Studio 14.0 1. warning C4275: non dll-interface class 'std::exception' used as base for dll-interface class 'vtkpugixml::xpath_exception' --- src/pugixml.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 5c928f5..c0dacb7 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -1251,6 +1251,12 @@ namespace pugi }; #ifndef PUGIXML_NO_EXCEPTIONS + #if defined(_MSC_VER) + // C4275 can be ignored in Visual C++ if you are deriving + // from a type in the Standard C++ Library + #pragma warning(push) + #pragma warning(disable: 4275) + #endif // XPath exception class class PUGIXML_CLASS xpath_exception: public std::exception { @@ -1267,6 +1273,9 @@ namespace pugi // Get parse result const xpath_parse_result& result() const; }; + #if defined(_MSC_VER) + #pragma warning(pop) + #endif #endif // XPath node class (either xml_node or xml_attribute)