Boost logo

Boost Users :

Subject: Re: [Boost-users] different member function signatures based on class template arguments
From: Hicham Mouline (hicham_at_[hidden])
Date: 2009-04-09 06:08:52


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Joel Falcou
> Sent: 08 April 2009 16:24
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] different member function signatures based on
> class template arguments
>
> Hicham Mouline a écrit :
> > I tried something along these lines:
> >
> > http://codepad.org/ieS3W2aO
> >
> > but it failed to compile...
> >
> > Shouldn't the enable_if metafct remove the invalid functions from the
> > overload set?
> >
> > Regards,
> >
> It probably failed because you use typename inside the enable_if
> condition. Make a meta-function that do your test and invoke it inside
> enable_if
> Here is an alternative working function that doesn't use enable_if :
>http://codepad.org/KZ4OTKxY

Great, this works very well.... Thank you,

I can't help thinking this is a king of common pattern
perhaps used inside boost itself many times,
and that there is some helper "something" for this already?

Because, basically I need 1 S_impl for each extra additional argument.
But I suppose I can generate them with BOOST_PP

Rds,


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