diff --git a/include/boost/ref.hpp b/include/boost/ref.hpp index e31b167..8169149 100644 --- a/include/boost/ref.hpp +++ b/include/boost/ref.hpp @@ -34,8 +34,16 @@ template class reference_wrapper public: typedef T type; +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) + + explicit reference_wrapper(T& t): t_(&t) {} + +#else + BOOST_FORCEINLINE explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} +#endif + BOOST_FORCEINLINE operator T& () const { return *t_; } BOOST_FORCEINLINE T& get() const { return *t_; }