Workarounds for broken RogueWave lib that comes with Sun

[SVN r16509]
This commit is contained in:
Dave Abrahams
2002-12-04 15:52:33 +00:00
parent c1f144e5d4
commit 8d549f45fd

View File

@ -98,6 +98,42 @@ struct iterator_traits
: std::iterator_traits<Iterator>
{};
using std::distance;
# elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
&& !defined(BOOST_MSVC_STD_ITERATOR)
// Rogue Wave Standard Library fools itself into thinking partial
// specialization is missing on some platforms (e.g. Sun), so fails to
// supply iterator_traits!
template <class Iterator>
struct iterator_traits
{
typedef typename Iterator::value_type value_type;
typedef typename Iterator::reference reference;
typedef typename Iterator::pointer pointer;
typedef typename Iterator::difference_type difference_type;
typedef typename Iterator::iterator_category iterator_category;
};
template <class T>
struct iterator_traits<T*>
{
typedef T value_type;
typedef T& reference;
typedef T* pointer;
typedef std::ptrdiff_t difference_type;
typedef std::random_access_iterator_tag iterator_category;
};
template <class T>
struct iterator_traits<T const*>
{
typedef T value_type;
typedef T const& reference;
typedef T const* pointer;
typedef std::ptrdiff_t difference_type;
typedef std::random_access_iterator_tag iterator_category;
};
# else
// is_mutable_iterator --