vtable on stack

Frank Winter frank.winter@desy.de
Tue Feb 2 13:47:00 GMT 2010


Hi Kevin!

>
> That's not quite correct here; you are not inserting a B into the vector
> at all. In the second call to push_back(), a temporary B object is

Thank you for pointing that out!

You mentioned a vector of references. As far as I now this is not 
possible.

vector<A&> vec;
or
A& vec[N];

Correct me if I am wrong. But I believe this is illegal C++ code. The 
compiler would have to transform a reference into a pointer.

--
Frank



More information about the Gcc-help mailing list