Jump to content
  • Advertisement
Sign in to follow this  
mindscout

C++ STL Question

This topic is 4948 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering how portable and eficient STL is? I read unfavourable opinions about STL's portability and performance. Could you guys tell me, what do you think about it? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
For the platforms I use and applications I write, I think that:

Portability: very good
Efficiency: very good

Also I read some favourable opinions about STL's portability and performance.

Share this post


Link to post
Share on other sites
Guest 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

Share this post


Link to post
Share on other sites
It's extremely efficient, bearing in mind that generality was also a major design factor. More importantly, it is very safe. And yes, it is very portable.

Share this post


Link to post
Share on other sites
Places where you don't use the STL (and be careful with C++ in general): embedded devices (mobile phones, handheld consoles, ...).
Even on consoles the STL comes in handy if it's not over-used.

Share this post


Link to post
Share on other sites
Quote:
Original post by Phillip Martin
Windows, Solaris, Linux, MacOSX.
Don't forget IRIX, BeOS, the BSDs, Mach, SunOS, etc. It works on all OSes that GNU's libstdc++ works on(so all the OSes that G++ works on). AFAIK, GNU's libstdc++ STL implementation doesn't contain any platform-specific code, so it should work on all modern OSes(probably even some slightly older ones). Where did you get the idea it isn't portable? It's only really only an API anyway...

Share this post


Link to post
Share on other sites
Quote:
Original post by Roboguy
Quote:
Original post by Phillip Martin
Windows, Solaris, Linux, MacOSX.
Don't forget IRIX, BeOS, the BSDs, Mach, SunOS, etc. It works on all OSes that GNU's libstdc++ works on(so all the OSes that G++ works on). AFAIK, GNU's libstdc++ STL implementation doesn't contain any platform-specific code, so it should work on all modern OSes(probably even some slightly older ones)


I didn't forget them, I just don't use them :D

Was responding to mindscout asking "Phillip, on which platforms did you use it ?", but I forgot to hit the quote button.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!