[C++-sig] Exposing virtual bool operator()(int )=0

Pedro Crespo Valero pedro.crespovalero at epfl.ch
Wed Mar 29 17:17:54 CEST 2006


Hello Dr. Abrahams,

Thanks for your fast answer :-)

David Abrahams a écrit :
> The name of the override in python isn't "operator()" but "__call__",
> thus:
>
>
>   
Upps.. it is true. I apologize  :-( !

>      bool operator()(int ii)
>      { return this->get_override("__call__")(ii); }
>
> I assume you are using this nasty explicit call<bool> because
> you're trying to use msvc 6.0 or 7.0, yes?
>
>      bool operator()(int ii)
>      { return call<bool>(this->get_override("__call__").ptr(),ii); }
>   
Yes, you assume well: msvc 7.0

Thank you very much INDEED!!

-- 
PC






More information about the Cplusplus-sig mailing list