From 3cf8d7d70a1ff2c0840f41dc9009922877b26928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brandl=2C=20Matth=C3=A4us=20=28MBR=29?= Date: Tue, 27 Feb 2018 16:26:56 +0100 Subject: [PATCH] Adds a macro definition to be able to use noexcept with supporting compilers --- src/pugixml.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pugixml.hpp b/src/pugixml.hpp index afe0a4d..b8f35f3 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -81,6 +81,17 @@ # endif #endif +// If C++ is 2011 or higher, add 'noexcept' specifiers +#ifndef PUGIXML_NOEXCEPT +# if __cplusplus >= 201103 +# define PUGIXML_NOEXCEPT noexcept +# elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026 +# define PUGIXML_NOEXCEPT noexcept +# else +# define PUGIXML_NOEXCEPT +# endif +#endif + // If C++ is 2011 or higher, add 'override' qualifiers #ifndef PUGIXML_OVERRIDE # if __cplusplus >= 201103