
29 Apr
2010
29 Apr
'10
3:41 p.m.
Hi Roman,
On Thu, Apr 29, 2010 at 9:23 AM, Roman Perepelitsa
2010/4/29 Francesco Biscani
Hi list,
how can I detect if a class inherits from a generic class? E.g.,
template <class Derived> class base {};
class final: public base<final> {};
is_instance_of from lambda library is what you want (see boost/lambda/detail/is_instance_of.hpp). It's not part of public interface though, so either copy it to your location or use on your own risk. Roman Perepelitsa.
thanks for the pointer, that's exactly it. However, I think I will end
up deriving the base class from a non-templated tag class and use
is_base_of