RE: [Algorithms] C++ STL hierarchical hash linked list
Brought to you by:
vexxed72
From: Peter W. <Pet...@vi...> - 2000-11-17 15:36:38
|
Corrinne Yu wrote: > Or do I roll my own and create a child class of STL iterator > list template > that handles a hashed array of lists? Not very helpful to your main question, but in general STL classes aren't designed for inheritance, and extending them by inheritance is a bad idea. For example, there's a lack of virtual destructors in STL classes, which makes public inheritance pretty dangerous. You're usually better off extending them using containment. I'm not familiar with hierarchical hash linked lists though, so I'm afraid I can't help you with that, sorry! :( Peter ps, Stepanov has some interesting ideas about library design, and one of the things he avoided was virtual functions and inheritance, there's an interview with him that talks a little about that stuff here: http://www.sgi.com/Technology/STL/drdobbs-interview.html |