Boost C++ Libraries: Ticket #9327: Fix compilation using Sun CC standard library https://svn.boost.org/trac10/ticket/9327 <p> I am not sure if this patch is going to be accepted, as it makes the code slightly longer and less clear, but it is needed to make the library build with Sun CC using its standard library (that we're unfortunately stuck with due to binary compatibility concerns). As <code>std::vector</code> simply doesn't provide a template ctor from 2 iterators, this is the best that can be done, AFAICS. </p> <p> Here is the same patch as in the attachment, for convenience: </p> <div class="wiki-code"> <div class="diff"> <ul class="entries"> <li class="entry"> <h2> <a>boost/test/impl/unit_test_main.ipp</a> </h2> <pre>diff --git a/boost/test/impl/unit_test_main.ipp b/boost/test/impl/unit_test_main.ipp index 9874c69..6896343 100644</pre> <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/test/impl/unit_test_main.ipp"> a </th> <th title="File b/boost/test/impl/unit_test_main.ipp"> b </th> <td> <em> public:</em> &nbsp; </td> </tr> </thead> <tbody class="unmod"> <tr> <th>110</th><th>110</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; string_token_iterator tit( tc_to_run, (dropped_delimeters = "/", kept_delimeters = dt_none) );</span></td> </tr> <tr> <th>111</th><th>111</th><td class="l"><span></span></td> </tr> <tr> <th>112</th><th>112</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; while( tit != string_token_iterator() ) {</span></td> </tr> </tbody> <tbody class="mod"> <tr class="first"> <th>113</th><th>&nbsp;</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_filters.push_back(</span></td> </tr> <tr> <th>114</th><th>&nbsp;</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; std::vector&lt;single_filter&gt;( string_token_iterator( *tit, (dropped_delimeters = ",", kept_delimeters = dt_none)&nbsp; ),</span></td> </tr> <tr> <th>115</th><th>&nbsp;</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string_token_iterator() ) );</span></td> </tr> <tr> <th>&nbsp;</th><th>113</th><td class="r"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; std::vector&lt;single_filter&gt; f;</span></td> </tr> <tr> <th>&nbsp;</th><th>114</th><td class="r"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for( string_token_iterator titf( *tit, (dropped_delimeters = ",", kept_delimeters = dt_none) ); titf != string_token_iterator(); ++titf )</span></td> </tr> <tr> <th>&nbsp;</th><th>115</th><td class="r"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; f.push_back( *titf );</span></td> </tr> <tr> <th>&nbsp;</th><th>116</th><td class="r"><span></span></td> </tr> <tr class="last"> <th>&nbsp;</th><th>117</th><td class="r"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_filters.push_back( f );</span></td> </tr> </tbody> <tbody class="unmod"> <tr> <th>116</th><th>118</th><td class="l"><span></span></td> </tr> <tr> <th>117</th><th>119</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ++tit;</span></td> </tr> <tr> <th>118</th><th>120</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; }</span></td> </tr> </tbody> </table> </li> </ul> </div></div> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9327 Trac 1.4.3 vz-boost@… Wed, 30 Oct 2013 19:37:18 GMT attachment set https://svn.boost.org/trac10/ticket/9327 https://svn.boost.org/trac10/ticket/9327 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">suncc_unit.diff</span> </li> </ul> <p> Proposed patch to fix the build with Sun CC </p> Ticket Raffi Enficiaud Tue, 07 Jul 2015 09:08:09 GMT owner changed https://svn.boost.org/trac10/ticket/9327#comment:1 https://svn.boost.org/trac10/ticket/9327#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Gennadiy Rozental</span> to <span class="trac-author">Raffi Enficiaud</span> </li> </ul> <p> We have now a builder for SunCC, and I believe the compilation should work now. Would you please test the boost master branch for us? We do not have access to this compiler. </p> Ticket Raffi Enficiaud Tue, 07 Jul 2015 09:08:22 GMT status changed https://svn.boost.org/trac10/ticket/9327#comment:2 https://svn.boost.org/trac10/ticket/9327#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket vz-boost@… Tue, 07 Jul 2015 13:42:36 GMT <link>https://svn.boost.org/trac10/ticket/9327#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9327#comment:3</guid> <description> <p> Sorry, but I wasn't able to find this SunCC builder, could you please point me to it? I'd like to see how is it configured, but I suspect that it uses the newer (everything is relative...) STLPort-based standard library instead of the ancient <a class="missing wiki">RogueWave</a>-based default standard library (see <a class="ext-link" href="http://docs.oracle.com/cd/E19205-01/819-5267/bkakb/index.html"><span class="icon">​</span>http://docs.oracle.com/cd/E19205-01/819-5267/bkakb/index.html</a> for more information) that we are unfortunately forced to use. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Tue, 07 Jul 2015 18:34:52 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9327#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9327#comment:4</guid> <description> <p> It is under <code>SunOS</code> there <a href="http://www.boost.org/development/tests/develop/developer/test.html">http://www.boost.org/development/tests/develop/developer/test.html</a> </p> <p> apparently using oracle compiler. This is the closest we have to your setup. Since I do not know anything about that platform and the toolchain, please report us in what extent the configuration is different to yours (it is using <code>sun-stlport4</code>). </p> </description> <category>Ticket</category> </item> <item> <author>vz-boost@…</author> <pubDate>Tue, 07 Jul 2015 19:00:10 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9327#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9327#comment:5</guid> <description> <p> <code>stlport4</code> does confirm that it uses STLPort (or has a very misleading name), which explains why it passes. I haven't retried building the latest sources yet, but if they haven't changed and still use the same ctor, it still won't build with the default RogueWave STL as it doesn't have a template vector ctor. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Tue, 07 Jul 2015 19:39:51 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9327#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9327#comment:6</guid> <description> <p> We will be needing your support for addressing this issue then. Would it be possible for you to test the current master or develop branch and report us any compilation issue? You can just run bjam from libs/test/test. We will then be able to know more about the effort needed by this issue. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>VZ</dc:creator> <pubDate>Thu, 28 Jan 2016 17:28:02 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9327#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9327#comment:7</guid> <description> <p> It's probably useless to keep this open, I tried building Boost 1.60 with this compiler and it's just hopeless, there are too many errors due to missing <code>std::iterator_traits</code> and I'm not sure I can (or even want...) to correct them. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Sun, 11 Dec 2016 19:09:13 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9327#comment:8 https://svn.boost.org/trac10/ticket/9327#comment:8 <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">wontfix</span> </li> </ul> <p> There are several builds on the boost regression dashboard showing the result for the sun platform. I am sorry I cannot help more with this, at least the ppl making the compiler for this architecture are aware of the problems. </p> Ticket