Index: boost/utility/addressof.hpp =================================================================== --- boost/utility/addressof.hpp (revision 85908) +++ boost/utility/addressof.hpp (working copy) @@ -25,8 +25,8 @@ { T & v_; - inline addr_impl_ref( T & v ): v_( v ) {} - inline operator T& () const { return v_; } + BOOST_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {} + BOOST_FORCEINLINE operator T& () const { return v_; } private: addr_impl_ref & operator=(const addr_impl_ref &); @@ -34,13 +34,13 @@ template struct addressof_impl { - static inline T * f( T & v, long ) + static BOOST_FORCEINLINE T * f( T & v, long ) { return reinterpret_cast( &const_cast(reinterpret_cast(v))); } - static inline T * f( T * v, int ) + static BOOST_FORCEINLINE T * f( T * v, int ) { return v; } @@ -48,7 +48,9 @@ } // namespace detail -template T * addressof( T & v ) +template +BOOST_FORCEINLINE +T * addressof( T & v ) { #if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || defined( __SUNPRO_CC ) @@ -74,6 +76,7 @@ } // namespace detail template< class T, std::size_t N > +BOOST_FORCEINLINE typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] ) { return &t; @@ -85,12 +88,14 @@ // but these overloads work around the problem. #if defined( __BORLANDC__ ) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template +BOOST_FORCEINLINE T (*addressof(T (&t)[N]))[N] { return reinterpret_cast(&t); } template +BOOST_FORCEINLINE const T (*addressof(const T (&t)[N]))[N] { return reinterpret_cast(&t);