mirror of
https://github.com/boostorg/function.git
synced 2025-07-23 17:37:14 +02:00
function_base.hpp:
- Make manager and functor members of function_base public instead of protected, because attempt to make HP aCC compile Boost.Function function_template.hpp: - HP aCC seems to believe that the functor and manager members inherited from function_base are inaccessible. So qualify them with the function_base base class. [SVN r12298]
This commit is contained in:
@ -326,7 +326,7 @@ namespace boost {
|
|||||||
// Is this function empty?
|
// Is this function empty?
|
||||||
bool empty() const { return !manager; }
|
bool empty() const { return !manager; }
|
||||||
|
|
||||||
protected:
|
public: // should be protected, but GCC 2.95.3 will fail to allow access
|
||||||
detail::function::any_pointer (*manager)(
|
detail::function::any_pointer (*manager)(
|
||||||
detail::function::any_pointer,
|
detail::function::any_pointer,
|
||||||
detail::function::functor_manager_operation_type);
|
detail::function::functor_manager_operation_type);
|
||||||
|
@ -231,7 +231,7 @@ namespace boost {
|
|||||||
policy_type policy;
|
policy_type policy;
|
||||||
policy.precall(this);
|
policy.precall(this);
|
||||||
|
|
||||||
result_type result = invoker(functor BOOST_FUNCTION_COMMA
|
result_type result = invoker(function_base::functor BOOST_FUNCTION_COMMA
|
||||||
BOOST_FUNCTION_ARGS);
|
BOOST_FUNCTION_ARGS);
|
||||||
|
|
||||||
policy.postcall(this);
|
policy.postcall(this);
|
||||||
@ -281,8 +281,8 @@ namespace boost {
|
|||||||
if (&other == this)
|
if (&other == this)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::swap(manager, other.manager);
|
std::swap(function_base::manager, other.manager);
|
||||||
std::swap(functor, other.functor);
|
std::swap(function_base::functor, other.functor);
|
||||||
std::swap(invoker, other.invoker);
|
std::swap(invoker, other.invoker);
|
||||||
std::swap(static_cast<Mixin&>(*this), static_cast<Mixin&>(other));
|
std::swap(static_cast<Mixin&>(*this), static_cast<Mixin&>(other));
|
||||||
}
|
}
|
||||||
@ -290,10 +290,10 @@ namespace boost {
|
|||||||
// Clear out a target, if there is one
|
// Clear out a target, if there is one
|
||||||
void clear()
|
void clear()
|
||||||
{
|
{
|
||||||
if (manager)
|
if (function_base::manager)
|
||||||
functor = manager(functor, detail::function::destroy_functor_tag);
|
function_base::functor = function_base::manager(function_base::functor, detail::function::destroy_functor_tag);
|
||||||
|
|
||||||
manager = 0;
|
function_base::manager = 0;
|
||||||
invoker = 0;
|
invoker = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,8 +302,8 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
if (!f.empty()) {
|
if (!f.empty()) {
|
||||||
invoker = f.invoker;
|
invoker = f.invoker;
|
||||||
manager = f.manager;
|
function_base::manager = f.manager;
|
||||||
functor = f.manager(f.functor, detail::function::clone_functor_tag);
|
function_base::functor = f.manager(f.functor, detail::function::clone_functor_tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,9 +328,9 @@ namespace boost {
|
|||||||
invoker_type;
|
invoker_type;
|
||||||
|
|
||||||
invoker = &invoker_type::invoke;
|
invoker = &invoker_type::invoke;
|
||||||
manager = &detail::function::functor_manager<FunctionPtr,
|
function_base::manager = &detail::function::functor_manager<FunctionPtr,
|
||||||
Allocator>::manage;
|
Allocator>::manage;
|
||||||
functor = manager(detail::function::any_pointer(
|
function_base::functor = function_base::manager(detail::function::any_pointer(
|
||||||
// should be a reinterpret cast, but some compilers
|
// should be a reinterpret cast, but some compilers
|
||||||
// insist on giving cv-qualifiers to free functions
|
// insist on giving cv-qualifiers to free functions
|
||||||
(void (*)())(f)
|
(void (*)())(f)
|
||||||
@ -360,10 +360,10 @@ namespace boost {
|
|||||||
invoker_type;
|
invoker_type;
|
||||||
|
|
||||||
invoker = &invoker_type::invoke;
|
invoker = &invoker_type::invoke;
|
||||||
manager = &detail::function::functor_manager<FunctionObj,
|
function_base::manager = &detail::function::functor_manager<FunctionObj,
|
||||||
Allocator>::manage;
|
Allocator>::manage;
|
||||||
functor =
|
function_base::functor =
|
||||||
manager(detail::function::any_pointer(const_cast<FunctionObj*>(&f)),
|
function_base::manager(detail::function::any_pointer(const_cast<FunctionObj*>(&f)),
|
||||||
detail::function::clone_functor_tag);
|
detail::function::clone_functor_tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -382,9 +382,9 @@ namespace boost {
|
|||||||
invoker_type;
|
invoker_type;
|
||||||
|
|
||||||
invoker = &invoker_type::invoke;
|
invoker = &invoker_type::invoke;
|
||||||
manager = &detail::function::trivial_manager;
|
function_base::manager = &detail::function::trivial_manager;
|
||||||
functor =
|
function_base::functor =
|
||||||
manager(detail::function::any_pointer(
|
function_base::manager(detail::function::any_pointer(
|
||||||
const_cast<FunctionObj*>(&f.get())),
|
const_cast<FunctionObj*>(&f.get())),
|
||||||
detail::function::clone_functor_tag);
|
detail::function::clone_functor_tag);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user