When copying boost::ref, copy even when the referenced function is empty. Fixes #2642

Patch by Steven Watanabe

[SVN r54616]
This commit is contained in:
Daniel James
2009-07-03 22:20:26 +00:00
parent 68128bfffa
commit ff3244d562
2 changed files with 29 additions and 8 deletions

View File

@ -625,14 +625,10 @@ namespace boost {
assign_to(const reference_wrapper<FunctionObj>& f,
function_buffer& functor, function_obj_ref_tag)
{
if (!boost::detail::function::has_empty_target(f.get_pointer())) {
functor.obj_ref.obj_ptr = (void *)f.get_pointer();
functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
return true;
} else {
return false;
}
functor.obj_ref.obj_ptr = (void *)f.get_pointer();
functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
return true;
}
template<typename FunctionObj,typename Allocator>
bool