Boost C++ Libraries: Ticket #5745: Use native typeof support for Oracle Solaris Studio C++ compiler https://svn.boost.org/trac10/ticket/5745 <p> Oracle Solaris Studio (former SunStudio) C++ compiler supports native typeof since version 5.9. At the same time, support for typeof emulation is not so good (many compilation errors). It would be beneficial for Boost users if Boost used native typeof instead of emulation. </p> <p> Here is proposed patch: </p> <pre class="wiki">*** boost/typeof/typeof.hpp 2011-08-01 18:46:33.411406362 +0400 --- boost/typeof/typeof.hpp.new 2011-08-01 18:46:43.680746049 +0400 *************** *** 155,160 **** --- 155,176 ---- # else # error native typeof is not supported # endif + #elif defined(__SUNPRO_CC) + # if (__SUNPRO_CC &lt; 0x590 ) + # ifdef BOOST_TYPEOF_NATIVE + # error native typeof is not supported + # endif + # ifndef BOOST_TYPEOF_EMULATION + # define BOOST_TYPEOF_EMULATION + # endif + # else + # ifndef BOOST_TYPEOF_EMULATION + # ifndef BOOST_TYPEOF_NATIVE + # define BOOST_TYPEOF_NATIVE + # endif + # define BOOST_TYPEOF_KEYWORD __typeof__ + # endif + # endif #else //unknown compiler # ifndef BOOST_TYPEOF_NATIVE # ifndef BOOST_TYPEOF_EMULATION </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5745 Trac 1.4.3 Peder Holt Sat, 06 Aug 2011 18:56:33 GMT status, milestone changed https://svn.boost.org/trac10/ticket/5745#comment:1 https://svn.boost.org/trac10/ticket/5745#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.48.0</span> </li> </ul> <p> Patch committed to trunk </p> Ticket Peder Holt Tue, 09 Aug 2011 07:03:25 GMT <link>https://svn.boost.org/trac10/ticket/5745#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5745#comment:2</guid> <description> <p> Even with the patch in place, most of the typeof regression tests still fail on the Sun compiler in native mode. <a href="http://www.boost.org/development/tests/trunk/developer/typeof.html">http://www.boost.org/development/tests/trunk/developer/typeof.html</a> This must be patched before this change can be integrated to release. I can apply the patch, but I don't have a Sun compiler so I can't write it. </p> </description> <category>Ticket</category> </item> <item> <author>Maxim Kartashev <maxim.kartashev@…></author> <pubDate>Tue, 09 Aug 2011 09:50:47 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5745#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5745#comment:3</guid> <description> <p> That's expected. Next version of Oracle Solaris Studio C++ compiler 5.12 will handle typeof-related tests more gracefully. There was a minor deviation from common typeof implementation and it has been fixed. </p> <p> I ran tests with patched boost and patched compiler in-house and got &gt;250 new passes. </p> </description> <category>Ticket</category> </item> </channel> </rss>