summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pugiconfig.hpp7
-rw-r--r--src/pugixml.cpp4
-rw-r--r--src/pugixml.hpp8
3 files changed, 7 insertions, 12 deletions
diff --git a/src/pugiconfig.hpp b/src/pugiconfig.hpp
index ef55644..bc49895 100644
--- a/src/pugiconfig.hpp
+++ b/src/pugiconfig.hpp
@@ -17,12 +17,13 @@
// Uncomment this to enable wchar_t mode
// #define PUGIXML_WCHAR_MODE
-// Uncomment this to disable STL
-// #define PUGIXML_NO_STL
-
// Uncomment this to disable XPath
// #define PUGIXML_NO_XPATH
+// Uncomment this to disable STL
+// Note: you can't use XPath with PUGIXML_NO_STL
+// #define PUGIXML_NO_STL
+
// Uncomment this to disable exceptions
// Note: you can't use XPath with PUGIXML_NO_EXCEPTIONS
// #define PUGIXML_NO_EXCEPTIONS
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 90023ea..3f871f1 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -17,10 +17,6 @@
#include "pugixml.hpp"
-#if !defined(PUGIXML_NO_XPATH) && defined(PUGIXML_NO_EXCEPTIONS)
-#error No exception mode can not be used with XPath support
-#endif
-
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 04d70d4..6861c08 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -56,11 +56,9 @@ namespace std
# endif
#endif
-// No XPath without STL
-#ifdef PUGIXML_NO_STL
-# ifndef PUGIXML_NO_XPATH
-# define PUGIXML_NO_XPATH
-# endif
+// No XPath without STL or exceptions
+#if (defined(PUGIXML_NO_STL) || defined(PUGIXML_NO_EXCEPTIONS)) && !defined(PUGIXML_NO_XPATH)
+# define PUGIXML_NO_XPATH
#endif
// Include exception header for XPath