#include class x{public: void f(class y &v){ printf("%d\n",sizeof(v)); }};class y{public: int x[100];};int main(){ x xv; y yv; xv.f(yv); return 0;}
Using Digital Mars C++, that produces the correct output of 400. How does that work? I was expecting a "size of wosssname is unknown" error.
Just playing around with some double dispatch ideas and read in a thread about this (class y &v) stuff to forward declare in the actual parameter list, which is handy to know, but I still don't see how the above can compile.
Very strange. Sure someone will explain it.