function_base.hpp:

- Changed "RET" to "type" in the IF template metafunction because
	  the GCC source headers define RET as a macro.


[SVN r10509]
This commit is contained in:
Douglas Gregor
2001-07-02 15:25:04 +00:00
parent 48948088fd
commit 93ad5963c9

View File

@ -35,7 +35,7 @@ namespace boost {
template<typename Then, typename Else> template<typename Then, typename Else>
struct Result struct Result
{ {
typedef Then RET; typedef Then type;
}; };
}; };
@ -44,29 +44,28 @@ namespace boost {
template<typename Then, typename Else> template<typename Then, typename Else>
struct Result struct Result
{ {
typedef Else RET; typedef Else type;
}; };
}; };
template<bool Condition> template<bool Condition>
struct Selector struct Selector
{ {
typedef SelectThen RET; typedef SelectThen type;
}; };
template<> template<>
struct Selector<false> struct Selector<false>
{ {
typedef SelectElse RET; typedef SelectElse type;
}; };
} // end namespace intimate } // end namespace intimate
template<bool Condition, typename Then, typename Else> template<bool Condition, typename Then, typename Else>
struct IF struct IF
{ {
typedef typename intimate::Selector<Condition>::RET select; typedef typename intimate::Selector<Condition>::type select;
typedef typename select::template Result<Then,Else>::RET RET; typedef typename select::template Result<Then,Else>::type type;
typedef RET type;
}; };
/** /**
@ -200,8 +199,8 @@ namespace boost {
manage(any_pointer functor_ptr, functor_manager_operation_type op) manage(any_pointer functor_ptr, functor_manager_operation_type op)
{ {
typedef typename IF<(is_pointer<functor_type>::value), typedef typename IF<(is_pointer<functor_type>::value),
function_ptr_tag, function_ptr_tag,
function_obj_tag>::RET tag_type; function_obj_tag>::type tag_type;
return manager(functor_ptr, op, tag_type()); return manager(functor_ptr, op, tag_type());
} }