summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pugiconfig.hpp2
-rw-r--r--src/pugixml.hpp26
2 files changed, 13 insertions, 15 deletions
diff --git a/src/pugiconfig.hpp b/src/pugiconfig.hpp
index a5e96a3..8842180 100644
--- a/src/pugiconfig.hpp
+++ b/src/pugiconfig.hpp
@@ -32,7 +32,7 @@
// #define PUGIXML_FUNCTION __fastcall // to set calling conventions to all public functions to fastcall
// In absence of PUGIXML_CLASS/PUGIXML_FUNCTION definitions PUGIXML_API is used instead
-// Header-only version
+// Uncomment this to switch to header-only version
// #define PUGIXML_HEADER_ONLY
// #include "pugixml.cpp"
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index efcc471..1400fb1 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -32,8 +32,13 @@
#ifndef PUGIXML_NO_STL
// cstddef is needed so that we get the 'std' namespace declaration (STLport sometimes makes std a define)
-#include <cstddef>
+# include <cstddef>
+# if defined(PUGIXML_NO_STL_FWDDECL)
+# include <iterator>
+# include <iosfwd>
+# include <string>
+# else
// Forward declarations for STL classes to reduce include dependencies
namespace std
{
@@ -41,19 +46,11 @@ namespace std
#ifdef __SUNPRO_CC
// Sun C++ compiler has a bug which forces template argument names in forward declarations to be the same as in actual definitions
-# ifndef _STLPORT_VERSION
- template <class T> class allocator;
- template <class charT> struct char_traits;
- template <class charT, class traits > class basic_istream;
- template <class charT, class traits > class basic_ostream;
- template <class charT, class traits, class Allocator> class basic_string;
-# else
- template <class _T> class allocator;
- template <class _charT> struct char_traits;
- template <class _charT, class _Traits> class basic_istream;
- template <class _charT, class _Traits> class basic_ostream;
- template <class _charT, class _Traits, class _Allocator> class basic_string;
-# endif
+ template <class _T> class allocator;
+ template <class _charT> struct char_traits;
+ template <class _charT, class _Traits> class basic_istream;
+ template <class _charT, class _Traits> class basic_ostream;
+ template <class _charT, class _Traits, class _Allocator> class basic_string;
#else
// Borland C++ compiler has a bug which forces template argument names in forward declarations to be the same as in actual definitions
template <class _Ty> class allocator;
@@ -77,6 +74,7 @@ namespace std
#endif
}
#endif
+#endif
// Macro for deprecated features
#ifndef PUGIXML_DEPRECATED