Boost C++ Libraries: Ticket #3893: Fix compilation with Sun CC (without stlport) https://svn.boost.org/trac10/ticket/3893 <p> 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. </p> <p> The patch is basically trivial and simply adds a workaround similar to the existing one for MSVC just above for Sun CC: </p> <div class="wiki-code"> <div class="diff"> <ul class="entries"> <li class="entry"> <h2> <a>boost/array.hpp</a> </h2> <table class="trac-diff inline" cellspacing="0"> <colgroup> <col class="lineno"/><col class="lineno"/><col class="content"/> </colgroup> <thead> <tr> <th title="File a/boost/array.hpp 2010-02-03 13:10:56.000000000 +0100"> a </th> <th title="File b/boost/array.hpp 2010-02-02 22:14:15.000000000 +0100"> b </th> <td> <em></em> &nbsp; </td> </tr> </thead> <tbody class="unmod"> <tr> <th>78</th><th>70</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reference, iterator, reference&gt; &gt; reverse_iterator;</span></td> </tr> <tr> <th>79</th><th>71</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; typedef std::reverse_iterator&lt;std::_Ptrit&lt;value_type, difference_type, const_iterator,</span></td> </tr> <tr> <th>80</th><th>72</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const_reference, iterator, reference&gt; &gt; const_reverse_iterator;</span></td> </tr> </tbody> <tbody class="add"> <tr class="first"> <th>&nbsp;</th><th>73</th><td class="r"><ins>#elif defined(__SUNPRO_CC) &amp;&amp; !defined(_STLPORT_VERSION)</ins></td> </tr> <tr class=""> <th>&nbsp;</th><th>74</th><td class="r"><ins>&nbsp; &nbsp; &nbsp; &nbsp; typedef std::reverse_iterator&lt;iterator, std::random_access_iterator_tag,</ins></td> </tr> <tr class=""> <th>&nbsp;</th><th>75</th><td class="r"><ins>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value_type, reference, iterator,</ins></td> </tr> <tr class=""> <th>&nbsp;</th><th>76</th><td class="r"><ins>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; difference_type&gt; reverse_iterator;</ins></td> </tr> <tr class=""> <th>&nbsp;</th><th>77</th><td class="r"><ins>&nbsp; &nbsp; &nbsp; &nbsp; typedef std::reverse_iterator&lt;const_iterator, std::random_access_iterator_tag,</ins></td> </tr> <tr class=""> <th>&nbsp;</th><th>78</th><td class="r"><ins>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value_type, const_reference, const_iterator,</ins></td> </tr> <tr class="last"> <th>&nbsp;</th><th>79</th><td class="r"><ins>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; difference_type&gt; const_reverse_iterator;</ins></td> </tr> </tbody> <tbody class="unmod"> <tr> <th>81</th><th>80</th><td class="l"><span>#else</span></td> </tr> <tr> <th>82</th><th>81</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; // workaround for broken reverse_iterator implementations</span></td> </tr> <tr> <th>83</th><th>82</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; typedef std::reverse_iterator&lt;iterator,T&gt; reverse_iterator;</span></td> </tr> </tbody> </table> </li> </ul> </div></div><p> TIA! </p> <p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3893 Trac 1.4.3 Vadim Zeitlin <vz-boost@…> Wed, 03 Feb 2010 13:48:30 GMT attachment set https://svn.boost.org/trac10/ticket/3893 https://svn.boost.org/trac10/ticket/3893 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-array.diff</span> </li> </ul> <p> Patch against latest svn trunk </p> Ticket Steven Watanabe Fri, 05 Feb 2010 16:53:30 GMT component changed; owner set https://svn.boost.org/trac10/ticket/3893#comment:1 https://svn.boost.org/trac10/ticket/3893#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">No-Maintainer</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">array</span> </li> </ul> Ticket Marshall Clow Wed, 10 Mar 2010 16:35:37 GMT <link>https://svn.boost.org/trac10/ticket/3893#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3893#comment:2</guid> <description> <p> Does this workaround need to be replicated around line 210 as well, or does the Sun CC not support partial template specialization? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Wed, 10 Mar 2010 16:45:23 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3893#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3893#comment:3</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/3893#comment:2" title="Comment 2">marshall</a>: </p> <blockquote class="citation"> <p> Does this workaround need to be replicated around line 210 as well, or does the Sun CC not support partial template specialization? </p> </blockquote> <p> Yeah, it would need to be duplicated. Sun CC does support partial specialization. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Wed, 10 Mar 2010 18:06:06 GMT</pubDate> <title>owner, status changed https://svn.boost.org/trac10/ticket/3893#comment:4 https://svn.boost.org/trac10/ticket/3893#comment:4 <ul> <li><strong>owner</strong> changed from <span class="trac-author">No-Maintainer</span> to <span class="trac-author">Marshall Clow</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Added in revision 60436. Will migrate to release before 1.43 </p> Ticket Marshall Clow Thu, 25 Mar 2010 15:58:53 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3893#comment:5 https://svn.boost.org/trac10/ticket/3893#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Migrated to release branch in revision 60824 </p> Ticket