[Boost-bugs] [Boost C++ Libraries] #5745: Use native typeof support for Oracle Solaris Studio C++ compiler

Subject: [Boost-bugs] [Boost C++ Libraries] #5745: Use native typeof support for Oracle Solaris Studio C++ compiler
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-08-01 14:51:59


#5745: Use native typeof support for Oracle Solaris Studio C++ compiler
----------------------------------------------------------+-----------------
 Reporter: Maxim Kartashev <maxim.kartashev@…> | Owner: burbelgruff
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: typeof
  Version: Boost 1.47.0 | Severity: Optimization
 Keywords: |
----------------------------------------------------------+-----------------
 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.

 Here is proposed patch:
 {{{
 *** 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 < 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
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5745>
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:07 UTC