|
Boost Users : |
Subject: Re: [Boost-users] boost::enable_if, did I get it wrong ?
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2009-08-18 14:26:41
Just another note, what is that suppose to be?
typename boost::disable_if<boost::is_void< B >, void>::type
> void virtual process(A *, B *) = 0;
It is not a return value or template argument. I hope I got right in the
previous post what you were going to do, and said that it is not supported.
On Tue, Aug 18, 2009 at 8:21 PM, Ovanes Markarian <om_boost_at_[hidden]>wrote:
> You can only apply enable_if to template arguments of the function and not
> of the class which contains the function, but you can't declare a virtual
> function template... So this is your dilemma.
>
> Regards,
> Ovanes
>
>
> On Tue, Aug 18, 2009 at 7:23 PM, topoden <_dvt__at_[hidden]> wrote:
>
>> template<class A, class B>
>> struct BaseListener
>> {
>> typename boost::disable_if<boost::is_void< B >, void>::type
>> void virtual process(A *, B *) = 0;
>>
>> typename boost::enable_if<boost::is_void< B >, void>::type
>> void virtual process(A *) = 0;
>> };
>>
>>
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