
The only thing you can determine, is, if the type (class) of the last declaration is the one you expected. That means if you know that the first declaration of your function comes in from baseT, you can determine if a deriving class overwrites that decl, and that is exactly what a deriving class needs to do to overload a virtual function. I myself use this pattern to determine, if a type is an XPCOM Interface or not. Perhaps you'd like to check for something similiar. If interested in details, let me know. Mathias Gaunard <mathias.gaunard@ens-lyon.org> Sent by: boost-bounces@lists.boost.org 21.03.2010 19:31 Please respond to boost@lists.boost.org To boost@lists.boost.org cc Subject Re: [boost] [mpl] has_function Lorenzo Caminiti wrote:
Is there a way I can check if a class has a given member function using metaprogramming?
Yes.
What I need is to check at compile-time if a function is overriding a virtual function or not.
This is not the same, and there is no way to do that as far as I know. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost