Untabified

[SVN r12335]
This commit is contained in:
Douglas Gregor
2002-01-17 15:57:13 +00:00
parent 647693dfc9
commit 96f7184528
2 changed files with 21 additions and 21 deletions

View File

@ -82,13 +82,13 @@ namespace boost {
template<typename T>
struct is_ref
{
BOOST_STATIC_CONSTANT(bool, value = false);
BOOST_STATIC_CONSTANT(bool, value = false);
};
template<typename T>
struct is_ref<reference_wrapper<T> >
{
BOOST_STATIC_CONSTANT(bool, value = true);
BOOST_STATIC_CONSTANT(bool, value = true);
};
#else // no partial specialization
typedef char yes_type;
@ -102,9 +102,9 @@ namespace boost {
template<typename T>
struct is_ref
{
static T* t;
BOOST_STATIC_CONSTANT(bool,
value = (sizeof(is_ref_tester(t)) == sizeof(yes_type)));
static T* t;
BOOST_STATIC_CONSTANT(bool,
value = (sizeof(is_ref_tester(t)) == sizeof(yes_type)));
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
@ -165,28 +165,28 @@ namespace boost {
template<typename F>
class get_function_tag
{
typedef typename IF<(is_pointer<F>::value),
typedef typename IF<(is_pointer<F>::value),
function_ptr_tag,
function_obj_tag>::type ptr_or_obj_tag;
typedef typename IF<(is_member_pointer<F>::value),
member_ptr_tag,
ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag;
typedef typename IF<(is_member_pointer<F>::value),
member_ptr_tag,
ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag;
public:
typedef typename IF<(is_ref<F>::value),
function_obj_ref_tag,
ptr_or_obj_or_mem_tag>::type type;
typedef typename IF<(is_ref<F>::value),
function_obj_ref_tag,
ptr_or_obj_or_mem_tag>::type type;
};
// The trivial manager does nothing but return the same pointer (if we
// are cloning) or return the null pointer (if we are deleting).
inline any_pointer trivial_manager(any_pointer f,
functor_manager_operation_type op)
functor_manager_operation_type op)
{
if (op == clone_functor_tag)
return f;
else
return any_pointer(reinterpret_cast<void*>(0));
if (op == clone_functor_tag)
return f;
else
return any_pointer(reinterpret_cast<void*>(0));
}
/**

View File

@ -331,8 +331,8 @@ namespace boost {
function_base::manager = &detail::function::functor_manager<FunctionPtr,
Allocator>::manage;
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
// should be a reinterpret cast, but some compilers
// insist on giving cv-qualifiers to free functions
(void (*)())(f)
),
detail::function::clone_functor_tag);
@ -370,7 +370,7 @@ namespace boost {
template<typename FunctionObj>
void assign_to(const reference_wrapper<FunctionObj>& f,
detail::function::function_obj_ref_tag)
detail::function::function_obj_ref_tag)
{
if (!detail::function::has_empty_target(&f.get())) {
typedef
@ -385,7 +385,7 @@ namespace boost {
function_base::manager = &detail::function::trivial_manager;
function_base::functor =
function_base::manager(detail::function::any_pointer(
const_cast<FunctionObj*>(&f.get())),
const_cast<FunctionObj*>(&f.get())),
detail::function::clone_functor_tag);
}
}