mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-31 00:13:01 +08:00
Different versions of RWSTL have different headers; revert the previous change and instead introduce PUGIXML_NO_STL_FWDDECL macro (that disables forward declaration of STL classes, which is not compliant).
git-svn-id: http://pugixml.googlecode.com/svn/trunk@857 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
cf779955d9
commit
23f891a92b
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user