
O/H Larry Evans έγραψε:
On 09/21/07 15:27, Achilleas Margaritis wrote: [snip]
Sorry, I haven't seen main_stl.cpp. Can I get it from somewhere?
Same place as your code in boost vault.
BTW, I'm trying to do std::list<T> correctly; however, I'm having problems. It appears allocator::pointer doesn't help when using:
struct node { T elem; node* next_; node* prev_; };
because the begin/end pointers are to node* not to T*.
Yeah, I originally thought that all STL implementations would use allocator<T>::pointer. Shame on me. So I guess only a re-implementation of STL containers would actually solve the problem. I am quite dissapointed. I have been battling with STL libraries all day, but without success. Microsoft, Mingw32, STLPort use T* instead of allocator::pointer. It's 2 am in the morning here, and I have just finished trying Rogue Wave's STL (actually, apache). Although it uses allocator::pointer, I can't compile a program with it: it says that namespace __rw is not allowed, although it compiles fine on some other files. Documentation is non-existence or hidden, so I am out of options, and also really tired of battling with every little detail of every implementation. With all these years of C++ development, I thought that these trivial issues would have been solved by now. Instead of that, it's like it is 1996 all over. It's a shame, because even if my garbage collector is not very good, it's an essential step for bringing really complicated data structures to C++ for the average C++ programmers like me. :-(