Container hierarchy vs. container types

Jonathan M Davis jmdavisProg at gmail.com
Fri Mar 5 08:32:27 PST 2010


> Why couldn't a container have the same interface as a range, only with
> the added ability to push elements into it?
> 

Probably because it would become way too easy to accidentally use the 
container as a range, which in many cases would end up emptying it when 
passing it to one of the std algorithms.

- Jonathan M Davis



More information about the Digitalmars-d mailing list