From c31ad8700ea05ad0c5286481c842c57f605b15a3 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 24 Jan 2004 18:29:18 +0000 Subject: [PATCH] Cast pointers, not lvalues [SVN r21897] --- include/boost/function/function_base.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/function/function_base.hpp b/include/boost/function/function_base.hpp index 0ea7604..635dc62 100644 --- a/include/boost/function/function_base.hpp +++ b/include/boost/function/function_base.hpp @@ -404,7 +404,7 @@ public: // should be protected, but GCC 2.95.3 will fail to allow access private: template Functor* get_functor_pointer(detail::function::function_ptr_tag, int) - { return &reinterpret_cast(functor.func_ptr); } + { return reinterpret_cast(&functor.func_ptr); } template Functor* get_functor_pointer(Tag, long) @@ -413,7 +413,7 @@ private: template const Functor* get_functor_pointer(detail::function::function_ptr_tag, int) const - { return &reinterpret_cast(functor.func_ptr); } + { return reinterpret_cast(&functor.func_ptr); } template const Functor* get_functor_pointer(Tag, long) const