C++ STL Question

Started by
12 comments, last by mindscout 19 years, 4 months ago
Quote:Original post by SiCrane
Portability is pretty much a non-issue. The STL was integrated as part of the C++ Standard Library, so if your compiler is standards compliant, then it'll have STL support. The only major sore spot in STL portability right now is all those people who are still using MSVC 6 since VC 6 doesn't grok template member functions; so some things like std::list::sort() aren't supported properly.


This sums up the STL situation very well. Most current compilers are mostly standard comforming, so chances are, everything will work.

Off topic:
Although for anyone interested, we hit a wrinkle in the STL implementation of maps and sets for VC7.1. The red black tree implementation makes a few non-standard assumptions with the tree's max_size() method vs the allocator's max_size() method. Pretty interesting stuff (at least for me :D)
Advertisement
Quote:Original post by Phillip Martin
Off topic:
Although for anyone interested, we hit a wrinkle in the STL implementation of maps and sets for VC7.1. The red black tree implementation makes a few non-standard assumptions with the tree's max_size() method vs the allocator's max_size() method. Pretty interesting stuff (at least for me :D)

That standard provides practically no guarantees for the behavior of max_size(), so it's hard for it to make any non-standard assumptions.
Quote:Original post by SiCrane
Quote:Original post by Phillip Martin
Off topic:
Although for anyone interested, we hit a wrinkle in the STL implementation of maps and sets for VC7.1. The red black tree implementation makes a few non-standard assumptions with the tree's max_size() method vs the allocator's max_size() method. Pretty interesting stuff (at least for me :D)

That standard provides practically no guarantees for the behavior of max_size(), so it's hard for it to make any non-standard assumptions.


Rather than taking over the thread, I started a new one.
http://www.gamedev.net/community/forums/topic.asp?topic_id=286892
Quote:Original post by Anonymous Poster
I think STL is good.

The best advice would probably be to use it and see if you like it, everyone has their own preferences, so just give it a go and see how it kicks out.

- Steve


Actually I use it at work and I like it. But I was unsure about its portability and performance. Thanks for the answers this thread was very useful...

This topic is closed to new replies.

Advertisement