Also as far I as I can tell making it a class would bloat it with unnecessary data(vtable), and being it is common to have many many instances of these containers, that doesn't sound like such a great thing.
I don't really think ref counted struct vs class is fair,
because in reality most containers don't need ref counting. I
can't think of one instance in C++ where I stuck a container
directly in a shared_ptr or anything similar.
- Re: std.container and classes Peter Alexander
- Re: std.container and classes Vladimir Panteleev
- Re: std.container and classes Jonathan M Davis
- Re: std.container and classes Andrei Alexandrescu
- Re: std.container and classes Jonathan M Davis
- Re: std.container and classes Andrei Alexandrescu
- Re: std.container and classes Jonathan M Davis
- Re: std.container and classes Jacob Carlborg
- Re: std.container and classes Steven Schveighoffer
- Re: std.container and classes Jerry
- Re: std.container and classes Froglegs
- Re: std.container and classes foobar