Fix on GCC 2.9x from Ralf

[SVN r22249]
This commit is contained in:
Douglas Gregor
2004-02-12 22:48:22 +00:00
parent f0c5e5e95b
commit 1a142a2f94
2 changed files with 7 additions and 4 deletions

View File

@ -188,8 +188,10 @@ namespace boost {
// The trivial manager does nothing but return the same pointer (if we // The trivial manager does nothing but return the same pointer (if we
// are cloning) or return the null pointer (if we are deleting). // are cloning) or return the null pointer (if we are deleting).
template<typename F> template<typename F>
inline any_pointer struct trivial_manager
trivial_manager(any_pointer f, functor_manager_operation_type op) {
static inline any_pointer
get(any_pointer f, functor_manager_operation_type op)
{ {
switch (op) { switch (op) {
case clone_functor_tag: return f; case clone_functor_tag: return f;
@ -209,6 +211,7 @@ namespace boost {
// Clears up a warning with GCC 3.2.3 // Clears up a warning with GCC 3.2.3
return make_any_pointer(reinterpret_cast<void*>(0)); return make_any_pointer(reinterpret_cast<void*>(0));
} }
};
/** /**
* The functor_manager class contains a static function "manage" which * The functor_manager class contains a static function "manage" which

View File

@ -508,7 +508,7 @@ namespace boost {
invoker_type; invoker_type;
invoker = &invoker_type::invoke; invoker = &invoker_type::invoke;
this->manager = &detail::function::trivial_manager<FunctionObj>; this->manager = &detail::function::trivial_manager<FunctionObj>::get;
this->functor = this->functor =
this->manager( this->manager(
detail::function::make_any_pointer( detail::function::make_any_pointer(
@ -529,7 +529,7 @@ namespace boost {
>::type >::type
invoker_type; invoker_type;
invoker = &invoker_type::invoke; invoker = &invoker_type::invoke;
this->manager = &detail::function::trivial_manager<FunctionObj>; this->manager = &detail::function::trivial_manager<FunctionObj>::get;
this->functor = detail::function::make_any_pointer(this); this->functor = detail::function::make_any_pointer(this);
} }