Opened 13 years ago

Closed 13 years ago

#3893 closed Patches (fixed)

Fix compilation with Sun CC (without stlport)

Reported by: Vadim Zeitlin <vz-boost@…> Owned by: Marshall Clow
Milestone: Boost 1.43.0 Component: array
Version: Boost 1.42.0 Severity: Problem
Keywords: suncc Cc:

Description

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:

  • boost/array.hpp

    a b  
    7870                                      reference, iterator, reference> > reverse_iterator;
    7971        typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
    8072                                      const_reference, iterator, reference> > const_reverse_iterator;
     73#elif defined(__SUNPRO_CC) && !defined(_STLPORT_VERSION)
     74        typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
     75                                      value_type, reference, iterator,
     76                                      difference_type> reverse_iterator;
     77        typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
     78                                      value_type, const_reference, const_iterator,
     79                                      difference_type> const_reverse_iterator;
    8180#else
    8281        // workaround for broken reverse_iterator implementations
    8382        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.

Attachments (1)

boost-array.diff (1.1 KB ) - added by Vadim Zeitlin <vz-boost@…> 13 years ago.
Patch against latest svn trunk

Download all attachments as: .zip

Change History (6)

by Vadim Zeitlin <vz-boost@…>, 13 years ago

Attachment: boost-array.diff added

Patch against latest svn trunk

comment:1 by Steven Watanabe, 13 years ago

Component: Nonearray
Owner: set to No-Maintainer

comment:2 by Marshall Clow, 13 years ago

Does this workaround need to be replicated around line 210 as well, or does the Sun CC not support partial template specialization?

in reply to:  2 comment:3 by Steven Watanabe, 13 years ago

Replying to marshall:

Does this workaround need to be replicated around line 210 as well, or does the Sun CC not support partial template specialization?

Yeah, it would need to be duplicated. Sun CC does support partial specialization.

comment:4 by Marshall Clow, 13 years ago

Owner: changed from No-Maintainer to Marshall Clow
Status: newassigned

Added in revision 60436. Will migrate to release before 1.43

comment:5 by Marshall Clow, 13 years ago

Resolution: fixed
Status: assignedclosed

Migrated to release branch in revision 60824

Note: See TracTickets for help on using tickets.