From 91385ac6276439482572fc44f7395bdf5278430d Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 27 Mar 2009 12:50:09 +0000 Subject: [PATCH] Another try at the Sun workaround. [SVN r52010] --- include/boost/utility/addressof.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/boost/utility/addressof.hpp b/include/boost/utility/addressof.hpp index bea9a01..ac42a51 100644 --- a/include/boost/utility/addressof.hpp +++ b/include/boost/utility/addressof.hpp @@ -60,7 +60,18 @@ template T * addressof( T & v ) #if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) ) -template T (*addressof(T (&t)[N]))[N] +namespace detail +{ + +template 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; }