Cast pointers, not lvalues

[SVN r21897]
This commit is contained in:
Douglas Gregor 2004-01-24 18:29:18 +00:00
parent cb1bcd5410
commit c31ad8700e

View File

@ -404,7 +404,7 @@ public: // should be protected, but GCC 2.95.3 will fail to allow access
private:
template<typename Functor>
Functor* get_functor_pointer(detail::function::function_ptr_tag, int)
{ return &reinterpret_cast<Functor>(functor.func_ptr); }
{ return reinterpret_cast<Functor*>(&functor.func_ptr); }
template<typename Functor, typename Tag>
Functor* get_functor_pointer(Tag, long)
@ -413,7 +413,7 @@ private:
template<typename Functor>
const Functor*
get_functor_pointer(detail::function::function_ptr_tag, int) const
{ return &reinterpret_cast<const Functor>(functor.func_ptr); }
{ return reinterpret_cast<const Functor*>(&functor.func_ptr); }
template<typename Functor, typename Tag>
const Functor* get_functor_pointer(Tag, long) const