Boost logo

Boost Users :

Subject: Re: [Boost-users] Detect generic base class
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2010-04-29 03:23:25


2010/4/29 Francesco Biscani <bluescarni_at_[hidden]>

> 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.



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