From 6156f0d302c9475429dba32273f04524d89adf0d Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 10 Apr 2002 17:01:35 +0000 Subject: [PATCH] Roll addressof() patch back in! [SVN r13433] --- 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_; }