diff --git a/include/boost/ref.hpp b/include/boost/ref.hpp index c7e23ca..e45dd17 100644 --- a/include/boost/ref.hpp +++ b/include/boost/ref.hpp @@ -6,6 +6,7 @@ # endif # include +# include // // ref.hpp - ref/cref, useful helper functions @@ -30,7 +31,7 @@ template class reference_wrapper public: typedef T type; - explicit reference_wrapper(T& t): t_(&t) {} + explicit reference_wrapper(T& t): t_(addressof(t)) {} operator T& () const { return *t_; }