#include <stdio.h>

class Base
{
   public:
      Base() {}
      virtual ~Base(){}

      virtual bool match( const void *data ) const { return false; }
};

template <class Type>
class Derived: public Base
{
   public:
      Derived():Base() {}
      ~Derived() override{}

      virtual bool match( const Type *data ) const override { return true; }
};

int main(int argc, char **argv)
{
   Derived<int> *d = new Derived<int>();
   Base *b         = d;

   int i;
   printf("B match = %s\n",b->match(&i)?"True":"False");
   printf("D match = %s\n",d->match(&i)?"True":"False");
}
