]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/array.hpp
complie fix
[lyx.git] / boost / boost / array.hpp
index 12621f744446bc559c16fdfbbfcbab1f37d2054a..c90c1f9e488c952f8f9087a5978374330e0eb13a 100644 (file)
@@ -5,12 +5,14 @@
  *      http://www.josuttis.com/cppcode
  * for details and the latest version.
  *
- * (C) Copyright Nicolai M. Josuttis 1999.
+ * (C) Copyright Nicolai M. Josuttis 2001.
  * Permission to copy, use, modify, sell and distribute this software
  * is granted provided this copyright notice appears in all copies.
  * This software is provided "as is" without express or implied
  * warranty, and with no claim as to its suitability for any purpose.
  *
+ * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.
+ * 05 Aug 2001 - minor update (Nico Josuttis)
  * 20 Jan 2001 - STLport fix (Beman Dawes)
  * 29 Sep 2000 - Initial Revision (Nico Josuttis)
  */
@@ -19,7 +21,9 @@
 
 #include <cstddef>
 #include <stdexcept>
-#include <iterator>
+
+// Handles broken standard libraries better than <iterator>
+#include <boost/detail/iterator.hpp>
 #include <algorithm>
 
 // FIXES for broken compilers
@@ -49,9 +53,15 @@ namespace boost {
         const_iterator end() const { return elems+N; }
 
         // reverse iterator support
-#if    !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR)
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
         typedef std::reverse_iterator<iterator> reverse_iterator;
         typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+#elif (defined(BOOST_MSVC) && (BOOST_MSVC == 1300) || (defined(__ICL) && defined(_CPPLIB_VER) && (_CPPLIB_VER == 310))) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+        // workaround for broken reverse_iterator in VC7
+        typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
+                                      reference, iterator, reference> > reverse_iterator;
+        typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
+                                      const_reference, iterator, reference> > const_reverse_iterator;
 #else
         // workaround for broken reverse_iterator implementations
         typedef std::reverse_iterator<iterator,T> reverse_iterator;
@@ -153,3 +163,7 @@ namespace boost {
 } /* namespace boost */
 
 #endif /*BOOST_ARRAY_HPP*/
+
+
+
+