From 1a142a2f944e78981b2b9b75b770e0c41d57311e Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 12 Feb 2004 22:48:22 +0000 Subject: [PATCH] Fix on GCC 2.9x from Ralf [SVN r22249] --- include/boost/function/function_base.hpp | 7 +++++-- include/boost/function/function_template.hpp | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/boost/function/function_base.hpp b/include/boost/function/function_base.hpp index e706736..fc57e66 100644 --- a/include/boost/function/function_base.hpp +++ b/include/boost/function/function_base.hpp @@ -188,8 +188,10 @@ namespace boost { // The trivial manager does nothing but return the same pointer (if we // are cloning) or return the null pointer (if we are deleting). template - inline any_pointer - trivial_manager(any_pointer f, functor_manager_operation_type op) + struct trivial_manager + { + static inline any_pointer + get(any_pointer f, functor_manager_operation_type op) { switch (op) { case clone_functor_tag: return f; @@ -209,6 +211,7 @@ namespace boost { // Clears up a warning with GCC 3.2.3 return make_any_pointer(reinterpret_cast(0)); } + }; /** * The functor_manager class contains a static function "manage" which diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index 96a2d71..ca124d0 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -508,7 +508,7 @@ namespace boost { invoker_type; invoker = &invoker_type::invoke; - this->manager = &detail::function::trivial_manager; + this->manager = &detail::function::trivial_manager::get; this->functor = this->manager( detail::function::make_any_pointer( @@ -529,7 +529,7 @@ namespace boost { >::type invoker_type; invoker = &invoker_type::invoke; - this->manager = &detail::function::trivial_manager; + this->manager = &detail::function::trivial_manager::get; this->functor = detail::function::make_any_pointer(this); }