summaryrefslogtreecommitdiff
path: root/src/pugixml.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r--src/pugixml.hpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index dc887a9..43256ec 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -82,23 +82,21 @@
#endif
// If C++ is 2011 or higher, add 'noexcept' specifiers
-#ifndef PUGIXML_HAS_NOEXCEPT
+#ifndef PUGIXML_NOEXCEPT
# if __cplusplus >= 201103
-# define PUGIXML_HAS_NOEXCEPT
-# elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026
-# define PUGIXML_HAS_NOEXCEPT
-# endif
-#endif
-#ifdef PUGIXML_HAS_NOEXCEPT
-# define PUGIXML_NOEXCEPT noexcept
-# ifdef PUGIXML_COMPACT
-# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
+# define PUGIXML_NOEXCEPT noexcept
+# elif defined(_MSC_VER) && _MSC_VER >= 1900
+# define PUGIXML_NOEXCEPT noexcept
# else
-# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT noexcept
+# define PUGIXML_NOEXCEPT
# endif
-#else
-# define PUGIXML_NOEXCEPT
+#endif
+
+// Some functions can not be noexcept in compact mode
+#ifdef PUGIXML_COMPACT
# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
+#else
+# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT PUGIXML_NOEXCEPT
#endif
// If C++ is 2011 or higher, add 'override' qualifiers