Opened 8 years ago

Closed 5 years ago

#10311 closed Bugs (fixed)

addressof and Solaris Studio compiler

Reported by: maxim.kartashev@… Owned by: Peter Dimov
Milestone: To Be Determined Component: core
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc: stephen.clamage@…, Andrey Semashev

Description

This is a request to extend resolution to Ticket #7079; recent version (5.13) of Oracle Solaris Studio compiler handles overloading better and workaround confuses it. Also, this solution makes recent compiler pass libs/utility/addressof_test2.cpp test.

$ diff -C4 boost/utility/addressof.hpp.old boost/utility/addressof.hpp
*** boost/utility/addressof.hpp.old	Mon Aug  4 19:21:05 2014
--- boost/utility/addressof.hpp	Mon Aug  4 19:27:46 2014
***************
*** 49,57 ****
  } // namespace detail
  
  template<class T> T * addressof( T & v )
  {
! #if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || defined( __SUNPRO_CC )
  
      return boost::detail::addressof_impl<T>::f( v, 0 );
  
  #else
--- 49,57 ----
  } // namespace detail
  
  template<class T> T * addressof( T & v )
  {
! #if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x5120))
  
      return boost::detail::addressof_impl<T>::f( v, 0 );
  
  #else

Change History (1)

comment:1 by Andrey Semashev, 5 years ago

Cc: Andrey Semashev added
Component: utilitycore
Owner: changed from No-Maintainer to Peter Dimov
Resolution: fixed
Status: newclosed

There have been lots of changes to addressof in later releases, and possibly the issue was fixed. I'm closing this ticket for now. Please, reopen if the issue is still present with Boost 1.64 or later.

Note: See TracTickets for help on using tickets.