Boost logo

Boost Users :

Subject: Re: [Boost-users] enable-if overloading out the wazoo
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-04-26 02:25:33


----- Original Message -----
From: "John Dlugosz" <JDlugosz_at_[hidden]>
To: <boost-users_at_[hidden]>
Sent: Friday, April 23, 2010 10:31 PM
Subject: [Boost-users] enable-if overloading out the wazoo

>
> I tried something like this: First, the general form in one header known by everything:
>
> template <typename T1, typename T2>
> dim_s foo (const T1& left, const T2& right);
>
> Then, in a header that gets more concrete, provide its own form that is meant to be used when objects of those types are involved:
>
> template<typename T1, typename T2>
> typename enable_if_c<
> is_base_of<genericbase,T1>::value &&
> is_base_of<genericbase,T2>::value,
> dim_s>::type foo (const T1& left, const T2& right);
>

What about overloading with the genericbase class?

dim_s foo (const genericbase& left, const genericbase& right);

Am I missing something?

Best,
Vicente


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net