From 7c48c7ad2833d7085179284082396ca74ab5ab96 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 10 Apr 2002 03:36:17 +0000 Subject: [PATCH] ref.hpp: - Use addressof() instead of & operator [SVN r13416] --- include/boost/ref.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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_; }