Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52010 - trunk/boost/utility
From: pdimov_at_[hidden]
Date: 2009-03-27 08:50:09


Author: pdimov
Date: 2009-03-27 08:50:09 EDT (Fri, 27 Mar 2009)
New Revision: 52010
URL: http://svn.boost.org/trac/boost/changeset/52010

Log:
Another try at the Sun workaround.
Text files modified:
   trunk/boost/utility/addressof.hpp | 13 ++++++++++++-
   1 files changed, 12 insertions(+), 1 deletions(-)

Modified: trunk/boost/utility/addressof.hpp
==============================================================================
--- trunk/boost/utility/addressof.hpp (original)
+++ trunk/boost/utility/addressof.hpp 2009-03-27 08:50:09 EDT (Fri, 27 Mar 2009)
@@ -60,7 +60,18 @@
 
 #if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) )
 
-template<class T, int N> T (*addressof(T (&t)[N]))[N]
+namespace detail
+{
+
+template<class T> struct addressof_addp
+{
+ typedef T * type;
+};
+
+} // namespace detail
+
+template< class T, std::size_t N >
+typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] )
 {
     return &t;
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk