Can we just have struct inheritence already?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon Jun 10 21:59:51 UTC 2019


On Monday, 10 June 2019 at 21:15:52 UTC, Walter Bright wrote:
> On 6/10/2019 7:42 AM, Andrei Alexandrescu wrote:
>> The same way it causes in C++. Crack open literally any C++ 
>> introductory book to find the explanation.
>
> Some reasons:
>
> https://stackoverflow.com/questions/4353203/thou-shalt-not-inherit-from-stdvector

The answers with high rating actually state that there is no 
problem in inheriting from std::vector…

> https://stackoverflow.com/questions/2034916/is-it-okay-to-inherit-implementation-from-stl-containers-rather-than-delegate

The most highly rated answer says that there is no problem with 
inheriting from std::vector if you don't rely on on having a 
virtual destructor…

So, not the best source for building an argument.



More information about the Digitalmars-d mailing list