$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] enable_if : how to make it work in the case of templated method of a template base inherited several times
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2011-10-20 10:50:07
On Thu, Oct 20, 2011 at 10:32 AM, nico <nicolas.guillot_at_[hidden]> wrote:
>
> template <typename T>
> class S
> {
> public:
>
> template <typename U>
> void f(U p, typename enable_if<is_same<T, U> >::type*dummy = 0)
>
First, why are you using enable_if here at all? Is there something wrong
with:
void f(T p )
> Any explanation or "workaround" ?
>
You need using declarations:
class A : public S<int>, public S<double>
{
public:
using S<int>::f;
using S<double>::f;
};
-- -Matt Calabrese