waterson and I are giving up on the current build being allowed to even include files related to STL, mostly (but not only) because of Solaris ... by the time someone want to _use_ STL, maybe the compilers will be better, and this fix won't effect them.
git-svn-id: svn://10.0.0.236/trunk@69597 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -35,17 +35,6 @@
|
||||
#include "nsCharTraits.h"
|
||||
#endif
|
||||
|
||||
#include <iterator>
|
||||
// for |bidirectional_iterator_tag|
|
||||
|
||||
#include <algorithm>
|
||||
// for |min|, |copy|
|
||||
|
||||
|
||||
#ifdef HAVE_CPP_NAMESPACE_STD
|
||||
using std::bidirectional_iterator_tag;
|
||||
#endif
|
||||
|
||||
/*
|
||||
This file defines the abstract interfaces |nsAReadableString| and
|
||||
|nsAReadableCString| (the 'A' is for 'abstract', as opposed to the 'I' in
|
||||
@@ -87,14 +76,14 @@ template <class CharT> class basic_nsAWritableString;
|
||||
|
||||
template <class CharT>
|
||||
class nsReadingIterator
|
||||
: public bidirectional_iterator_tag
|
||||
// : public bidirectional_iterator_tag
|
||||
{
|
||||
public:
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef CharT value_type;
|
||||
typedef const CharT* pointer;
|
||||
typedef const CharT& reference;
|
||||
typedef bidirectional_iterator_tag iterator_category;
|
||||
// typedef bidirectional_iterator_tag iterator_category;
|
||||
|
||||
private:
|
||||
friend class basic_nsAReadableString<CharT>;
|
||||
|
||||
@@ -48,14 +48,14 @@ template <class CharT> class basic_nsAWritableString;
|
||||
|
||||
template <class CharT>
|
||||
class nsWritingIterator
|
||||
: public bidirectional_iterator_tag
|
||||
// : public bidirectional_iterator_tag
|
||||
{
|
||||
public:
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef CharT value_type;
|
||||
typedef CharT* pointer;
|
||||
typedef CharT& reference;
|
||||
typedef bidirectional_iterator_tag iterator_category;
|
||||
// typedef bidirectional_iterator_tag iterator_category;
|
||||
|
||||
private:
|
||||
friend class basic_nsAWritableString<CharT>;
|
||||
|
||||
@@ -173,15 +173,6 @@ typedef PRUint16 PRUnichar;
|
||||
#define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CPP_NAMESPACE_STD
|
||||
#define NS_STD_ std
|
||||
#else
|
||||
#define NS_STD_
|
||||
#endif
|
||||
|
||||
#define NS_MIN NS_STD_ ::min
|
||||
#define NS_MAX NS_STD_ ::max
|
||||
|
||||
/* under VC++ (Windows), we don't have autoconf yet */
|
||||
#if defined(_MSC_VER) && (_MSC_VER>=1100)
|
||||
/* VC++ 5.0 and greater implement template specialization, 4.2 is unknown */
|
||||
@@ -201,13 +192,6 @@ typedef PRUint16 PRUnichar;
|
||||
|
||||
#define HAVE_CPP_NAMESPACE_STD
|
||||
#define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL
|
||||
|
||||
/* VC++ is special and doesn't use naked min() and max() */
|
||||
#undef NS_MIN
|
||||
#define NS_MIN std::_cpp_min
|
||||
|
||||
#undef NS_MAX
|
||||
#define NS_MAX std::_cpp_max
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX
|
||||
@@ -266,4 +250,21 @@ typedef PRUint16 PRUnichar;
|
||||
the semantics. So if you want to dynamic_cast, then just use it
|
||||
"straight", no macro. */
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
const T&
|
||||
NS_MIN( const T& a, const T& b )
|
||||
{
|
||||
return b < a ? b : a;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
const T&
|
||||
NS_MAX( const T& a, const T& b )
|
||||
{
|
||||
return a > b ? a : b;
|
||||
}
|
||||
|
||||
|
||||
#endif /* nscore_h___ */
|
||||
|
||||
@@ -35,17 +35,6 @@
|
||||
#include "nsCharTraits.h"
|
||||
#endif
|
||||
|
||||
#include <iterator>
|
||||
// for |bidirectional_iterator_tag|
|
||||
|
||||
#include <algorithm>
|
||||
// for |min|, |copy|
|
||||
|
||||
|
||||
#ifdef HAVE_CPP_NAMESPACE_STD
|
||||
using std::bidirectional_iterator_tag;
|
||||
#endif
|
||||
|
||||
/*
|
||||
This file defines the abstract interfaces |nsAReadableString| and
|
||||
|nsAReadableCString| (the 'A' is for 'abstract', as opposed to the 'I' in
|
||||
@@ -87,14 +76,14 @@ template <class CharT> class basic_nsAWritableString;
|
||||
|
||||
template <class CharT>
|
||||
class nsReadingIterator
|
||||
: public bidirectional_iterator_tag
|
||||
// : public bidirectional_iterator_tag
|
||||
{
|
||||
public:
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef CharT value_type;
|
||||
typedef const CharT* pointer;
|
||||
typedef const CharT& reference;
|
||||
typedef bidirectional_iterator_tag iterator_category;
|
||||
// typedef bidirectional_iterator_tag iterator_category;
|
||||
|
||||
private:
|
||||
friend class basic_nsAReadableString<CharT>;
|
||||
|
||||
@@ -48,14 +48,14 @@ template <class CharT> class basic_nsAWritableString;
|
||||
|
||||
template <class CharT>
|
||||
class nsWritingIterator
|
||||
: public bidirectional_iterator_tag
|
||||
// : public bidirectional_iterator_tag
|
||||
{
|
||||
public:
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef CharT value_type;
|
||||
typedef CharT* pointer;
|
||||
typedef CharT& reference;
|
||||
typedef bidirectional_iterator_tag iterator_category;
|
||||
// typedef bidirectional_iterator_tag iterator_category;
|
||||
|
||||
private:
|
||||
friend class basic_nsAWritableString<CharT>;
|
||||
|
||||
@@ -35,17 +35,6 @@
|
||||
#include "nsCharTraits.h"
|
||||
#endif
|
||||
|
||||
#include <iterator>
|
||||
// for |bidirectional_iterator_tag|
|
||||
|
||||
#include <algorithm>
|
||||
// for |min|, |copy|
|
||||
|
||||
|
||||
#ifdef HAVE_CPP_NAMESPACE_STD
|
||||
using std::bidirectional_iterator_tag;
|
||||
#endif
|
||||
|
||||
/*
|
||||
This file defines the abstract interfaces |nsAReadableString| and
|
||||
|nsAReadableCString| (the 'A' is for 'abstract', as opposed to the 'I' in
|
||||
@@ -87,14 +76,14 @@ template <class CharT> class basic_nsAWritableString;
|
||||
|
||||
template <class CharT>
|
||||
class nsReadingIterator
|
||||
: public bidirectional_iterator_tag
|
||||
// : public bidirectional_iterator_tag
|
||||
{
|
||||
public:
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef CharT value_type;
|
||||
typedef const CharT* pointer;
|
||||
typedef const CharT& reference;
|
||||
typedef bidirectional_iterator_tag iterator_category;
|
||||
// typedef bidirectional_iterator_tag iterator_category;
|
||||
|
||||
private:
|
||||
friend class basic_nsAReadableString<CharT>;
|
||||
|
||||
@@ -48,14 +48,14 @@ template <class CharT> class basic_nsAWritableString;
|
||||
|
||||
template <class CharT>
|
||||
class nsWritingIterator
|
||||
: public bidirectional_iterator_tag
|
||||
// : public bidirectional_iterator_tag
|
||||
{
|
||||
public:
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef CharT value_type;
|
||||
typedef CharT* pointer;
|
||||
typedef CharT& reference;
|
||||
typedef bidirectional_iterator_tag iterator_category;
|
||||
// typedef bidirectional_iterator_tag iterator_category;
|
||||
|
||||
private:
|
||||
friend class basic_nsAWritableString<CharT>;
|
||||
|
||||
Reference in New Issue
Block a user