This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can our C++ vectors hold derived classes?


On 2013-06-12 13:23 , Martin Jambor wrote:
Hi everyone, but especially Diego :-)

it seems to me that our new C++ vectors have some problems holding
derived classes.  For example, when try to compile the following

The vec implementation in vec.[hc] must be a POD because we store vectors in unions and such. This also means that it can only hold PODs inside of it. This is also why we have such whacky initialization and need to use a special vNULL instance.

I noted this in the documentation of the new API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec), but I think it could be more explicit in vec.h or in the texinfo docs (I'm not sure if I updated those).


Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]