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?
|
||||
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,
|
||||
detail::function::functor_manager_operation_type);
|
||||
|
@ -231,7 +231,7 @@ namespace boost {
|
||||
policy_type policy;
|
||||
policy.precall(this);
|
||||
|
||||
result_type result = invoker(functor BOOST_FUNCTION_COMMA
|
||||
result_type result = invoker(function_base::functor BOOST_FUNCTION_COMMA
|
||||
BOOST_FUNCTION_ARGS);
|
||||
|
||||
policy.postcall(this);
|
||||
@ -281,8 +281,8 @@ namespace boost {
|
||||
if (&other == this)
|
||||
return;
|
||||
|
||||
std::swap(manager, other.manager);
|
||||
std::swap(functor, other.functor);
|
||||
std::swap(function_base::manager, other.manager);
|
||||
std::swap(function_base::functor, other.functor);
|
||||
std::swap(invoker, other.invoker);
|
||||
std::swap(static_cast<Mixin&>(*this), static_cast<Mixin&>(other));
|
||||
}
|
||||
@ -290,10 +290,10 @@ namespace boost {
|
||||
// Clear out a target, if there is one
|
||||
void clear()
|
||||
{
|
||||
if (manager)
|
||||
functor = manager(functor, detail::function::destroy_functor_tag);
|
||||
if (function_base::manager)
|
||||
function_base::functor = function_base::manager(function_base::functor, detail::function::destroy_functor_tag);
|
||||
|
||||
manager = 0;
|
||||
function_base::manager = 0;
|
||||
invoker = 0;
|
||||
}
|
||||
|
||||
@ -302,8 +302,8 @@ namespace boost {
|
||||
{
|
||||
if (!f.empty()) {
|
||||
invoker = f.invoker;
|
||||
manager = f.manager;
|
||||
functor = f.manager(f.functor, detail::function::clone_functor_tag);
|
||||
function_base::manager = f.manager;
|
||||
function_base::functor = f.manager(f.functor, detail::function::clone_functor_tag);
|
||||
}
|
||||
}
|
||||
|
||||
@ -328,9 +328,9 @@ namespace boost {
|
||||
invoker_type;
|
||||
|
||||
invoker = &invoker_type::invoke;
|
||||
manager = &detail::function::functor_manager<FunctionPtr,
|
||||
function_base::manager = &detail::function::functor_manager<FunctionPtr,
|
||||
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
|
||||
// insist on giving cv-qualifiers to free functions
|
||||
(void (*)())(f)
|
||||
@ -360,10 +360,10 @@ namespace boost {
|
||||
invoker_type;
|
||||
|
||||
invoker = &invoker_type::invoke;
|
||||
manager = &detail::function::functor_manager<FunctionObj,
|
||||
function_base::manager = &detail::function::functor_manager<FunctionObj,
|
||||
Allocator>::manage;
|
||||
functor =
|
||||
manager(detail::function::any_pointer(const_cast<FunctionObj*>(&f)),
|
||||
function_base::functor =
|
||||
function_base::manager(detail::function::any_pointer(const_cast<FunctionObj*>(&f)),
|
||||
detail::function::clone_functor_tag);
|
||||
}
|
||||
}
|
||||
@ -382,9 +382,9 @@ namespace boost {
|
||||
invoker_type;
|
||||
|
||||
invoker = &invoker_type::invoke;
|
||||
manager = &detail::function::trivial_manager;
|
||||
functor =
|
||||
manager(detail::function::any_pointer(
|
||||
function_base::manager = &detail::function::trivial_manager;
|
||||
function_base::functor =
|
||||
function_base::manager(detail::function::any_pointer(
|
||||
const_cast<FunctionObj*>(&f.get())),
|
||||
detail::function::clone_functor_tag);
|
||||
}
|
||||
|
Reference in New Issue
Block a user