Sign in to follow this  
Nairou

STLPort?

Recommended Posts

Not long after deciding to go ahead and use the STL, I discover STLPort. I'm curious why it exists? If every compiler comes with the STL, why create a separate version? Is it really optimized? Or is it just for peace of mind, using the same code base over all platforms? Any REAL advantage to using it over what my compiler (VC7.1 in this case) provides?

Share this post


Link to post
Share on other sites
I think it's a cross platform stl and MS one isn't? The stl shipped with vc6 was from dinkum and wasn't up to snuff. Stlport mirrors c++ standard stl specs + extensions. It's from the old sgi codebase. I don't know about vc7.1 stl and whether it's c++ compliant and to what extent.

Share this post


Link to post
Share on other sites
You can read about it on the website.

It is exception safe, multithread safe, has advanced debugging features to help with correct usage of the library, it is free, it is portable, etc.

Some compilers come with STLPort as their STL implementation, eg. digitalmars and borland.

[Edited by - petewood on September 2, 2004 7:45:07 AM]

Share this post


Link to post
Share on other sites
Maybe someone just had a bad mood?

Seriously, I've had the same thing happen, it is bloody annoying. Makes me less enthousiastic about the rating system. The best thing you can do right now is randomly retaliate by rating anyone down that might have done it, maybe you'll get the bastard back!!

:P

Share this post


Link to post
Share on other sites
Quote:
Original post by Nairou
I'm curious why it exists?

The standard for STL gives a great deal of freedom to vendors. While the general requirements are the same for all vendors (interfaces, algorithm complexity), a great deal of details are left up to vendors' discretion. If you write code using VC7.1 STL and later attempt to port it to another platform that has a different STL vendor, you're likely to encounter some of these issues. Most people don't know the standard like that back of their own hand and are likely to write code that depends on features that aren't in the standard and are vendor specific. This is one of the reasons why STLPort is useful: you can use the same implementation across many platforms and not worry about depending on vendor specific features.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this