S
skscpp
Here is the code that I currently have:
template <typename type, typename ret>
struct XdrFunctionType
{
typedef type Type;
typedef ret (*Policy)(XDR*, Type*);
};
template <typename type, typename ret, typename XdrFunctionType<type,
ret>:olicy>
struct XdrPolicy
{
typedef type Type;
typedef XdrFunctionType<type, ret>:olicy Policy;
};
=====================
I want to specialize XdrPolicy template for ret type of bool and ret type of
bool_t.
In other words, I don't want the clients of XdrPolicy to have to enter 3
template parameters but rather only two: the "type" and the "Policy"
function. I want the "ret" type to be implicitly known somehow - is that
possible with what I have or with slight variation from it.
Thanks.
template <typename type, typename ret>
struct XdrFunctionType
{
typedef type Type;
typedef ret (*Policy)(XDR*, Type*);
};
template <typename type, typename ret, typename XdrFunctionType<type,
ret>:olicy>
struct XdrPolicy
{
typedef type Type;
typedef XdrFunctionType<type, ret>:olicy Policy;
};
=====================
I want to specialize XdrPolicy template for ret type of bool and ret type of
bool_t.
In other words, I don't want the clients of XdrPolicy to have to enter 3
template parameters but rather only two: the "type" and the "Policy"
function. I want the "ret" type to be implicitly known somehow - is that
possible with what I have or with slight variation from it.
Thanks.