forked from boostorg/function
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:
@ -35,7 +35,7 @@ namespace boost {
|
||||
template<typename Then, typename Else>
|
||||
struct Result
|
||||
{
|
||||
typedef Then RET;
|
||||
typedef Then type;
|
||||
};
|
||||
};
|
||||
|
||||
@ -44,29 +44,28 @@ namespace boost {
|
||||
template<typename Then, typename Else>
|
||||
struct Result
|
||||
{
|
||||
typedef Else RET;
|
||||
typedef Else type;
|
||||
};
|
||||
};
|
||||
|
||||
template<bool Condition>
|
||||
struct Selector
|
||||
{
|
||||
typedef SelectThen RET;
|
||||
typedef SelectThen type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct Selector<false>
|
||||
{
|
||||
typedef SelectElse RET;
|
||||
typedef SelectElse type;
|
||||
};
|
||||
} // end namespace intimate
|
||||
|
||||
template<bool Condition, typename Then, typename Else>
|
||||
struct IF
|
||||
{
|
||||
typedef typename intimate::Selector<Condition>::RET select;
|
||||
typedef typename select::template Result<Then,Else>::RET RET;
|
||||
typedef RET type;
|
||||
typedef typename intimate::Selector<Condition>::type select;
|
||||
typedef typename select::template Result<Then,Else>::type type;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -201,7 +200,7 @@ namespace boost {
|
||||
{
|
||||
typedef typename IF<(is_pointer<functor_type>::value),
|
||||
function_ptr_tag,
|
||||
function_obj_tag>::RET tag_type;
|
||||
function_obj_tag>::type tag_type;
|
||||
|
||||
return manager(functor_ptr, op, tag_type());
|
||||
}
|
||||
|
Reference in New Issue
Block a user