[Boost-bugs] [Boost C++ Libraries] #3893: Fix compilation with Sun CC (without stlport)

Subject: [Boost-bugs] [Boost C++ Libraries] #3893: Fix compilation with Sun CC (without stlport)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-02-03 13:47:32


#3893: Fix compilation with Sun CC (without stlport)
---------------------------------------------------+------------------------
 Reporter: Vadim Zeitlin <vz-boost@…> | Owner:
     Type: Patches | Status: new
Milestone: Boost 1.43.0 | Component: None
  Version: Boost 1.42.0 | Severity: Problem
 Keywords: suncc |
---------------------------------------------------+------------------------
 Apparently Sun CC with its (ancient) STL is not officially supported by
 Boost but I hope you can consider this patch which at least allows me to
 use boost/array.hpp (and, more importantly, many other headers which use
 it) in my code which can't be compiled with STLport.

 The patch is basically trivial and simply adds a workaround similar to the
 existing one for MSVC just above for Sun CC:
 {{{
 #!diff
 --- a/boost/array.hpp 2010-02-03 13:10:56.000000000 +0100
 +++ b/boost/array.hpp 2010-02-02 22:14:15.000000000 +0100
 @@ -78,6 +70,13 @@
                                        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(__SUNPRO_CC) && !defined(_STLPORT_VERSION)
 + typedef std::reverse_iterator<iterator,
 std::random_access_iterator_tag,
 + value_type, reference, iterator,
 + difference_type> reverse_iterator;
 + typedef std::reverse_iterator<const_iterator,
 std::random_access_iterator_tag,
 + value_type, const_reference,
 const_iterator,
 + difference_type>
 const_reverse_iterator;
  #else
          // workaround for broken reverse_iterator implementations
          typedef std::reverse_iterator<iterator,T> reverse_iterator;
 }}}

 TIA!

 P.S. The window is apparently too narrow to show the patch without
 mangling it, hopefully you can still read (and apply it) however using the
 attached file.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3893>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC