Image

Imagejetsnail wrote in Imagecpp

Just a funny peace of code. How you compiler processes it?

struct A {
};

template<typename TList>
struct MultipleInheritance :
  public TList::Head,
  public MultipleInheritance<typename TList::Tail>
{
};

template <typename T1>
struct RecTList {
  typedef T1 Head;
  typedef RecTList< RecTList<T1> > Tail;
};

typedef RecTList<A> ARecTList;

class RectClass : public MultipleInheritance<ARecTList> {};

int main() {
  return 0;
}