Boost logo

Boost :

From: Christopher Currie (christopher_at_[hidden])
Date: 2003-11-11 15:05:28


Attached is a patch to array.cpp to fix the reverse iterator on Sun C++.
This patch fixes the regression in array3.cpp.

Ok if I commit it?

Christopher

Index: array.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/array.hpp,v
retrieving revision 1.18
diff -u -r1.18 array.hpp
--- array.hpp 23 Dec 2002 02:43:12 -0000 1.18
+++ array.hpp 11 Nov 2003 19:59:48 -0000
@@ -65,6 +65,10 @@
                                       reference, iterator, reference> > reverse_iterator;
         typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
                                       const_reference, iterator, reference> > const_reverse_iterator;
+#elif defined(BOOST_RWSTD_VER) && defined(BOOST_NO_STD_ITERATOR_TRAITS)
+ // workaround for broken reverse_iterator in Sun C++
+ typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, T> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag, T> const_reverse_iterator;
 #else
         // workaround for broken reverse_iterator implementations
         typedef std::reverse_iterator<iterator,T> reverse_iterator;


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk