Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Which is the best public domain STL?

Posted on 2000-03-21
9
187 Views
Last Modified: 2011-10-03
Unless I hear otherwise, I will probably use the
gcc public domain STL, developed by SGI.

My hope is that I can use containers portably -
wish me luck.

Ken
0
Comment
Question by:klopter
  • 4
  • 3
  • 2
9 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 2641281
What compiler are you using?   As I indicated on your other question, porting STL from one compiler/platform to another can be difficult.  There are differences between compilers (most are unintentional) and there are differences between OSes (intentional) and most STL implimentations are written for a particular compiler/OS to insulate you from these differences.  If you port the STL to a diffferent compiler/OS you will probably find problems due to these differences.  

Usually you want to port the code that uses the STL, not the STL itself.

Recent copies of the GCC compiler and STL should be very close to standard.  That means that they will be very portable to other programs that are close to standard, which is more and more all the time.
0
 
LVL 11

Accepted Solution

by:
alexo earned 75 total points
ID: 2643368
www.stlport.org
Absolutely best (and multiplatform to boot!)
0
 

Author Comment

by:klopter
ID: 2644934
I have downloaded it and I will give it a try.

nietod - I respect your advice and
I will only use this as a backup.
In other words, I am going to use
gcc and cxx's STL, but I am also going
to make sure that I can use this STL
from stlport.

Ken
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 22

Expert Comment

by:nietod
ID: 2645026
Sound's reasonable.
0
 
LVL 11

Expert Comment

by:alexo
ID: 2648139
There are currently several problems with the standard library (which the STL is part of).
1) Bugs/deficiencies in the library implementation
2) Bugs/deficiencies/missing features in the underlying compiler

The people who brought you stlport tried to address both issues.

1) The library is free, open source and multiplatform.  That means that a lot of people will be able to spot and report bugs.  The active development means that these bugs are squished reasonably quickly.

2) stlport tries to address compilers "issues" by tailoring the code to known compilers (via #ifdef etc.) and either providing workarounds around the wrong behaviour or not making some features available on some platforms.

But there is only that much that they can do!  If you port your code from a good compiler to one whose template support is lacking, there *will* be features that just cannot be implemented on that compiler.  The good news is that if you use a good multiplatform library implementation you'll catch the errors at compile time.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2648724
The vast majority of errers that will occur will be compile-time errors.  I compile my programs under VC, but in an effort to keep ite more portable every few months or so I compile it under BCB.  BCB will catch mistakes (non-standard syntax type things) that VC missed. It usually takes a few hours to correct al the mistakes and then the code will compile under both and as far as I have ever seen, work correctly under both.  As both VC and BCB advance they get more standard so this becomes easier to do with time.  That should be your experience too.  The longer you wait to port, the less problems you will have.
0
 

Author Comment

by:klopter
ID: 2649079
This all sounds very promising.

I doubt that I will have any trouble with STL.
Right now I am only using lists and vectors.
I am hopeful that I won't have much difficulty
finding a subset of functions within these that
work well.

Ken
0
 
LVL 11

Expert Comment

by:alexo
ID: 2650510
>> As both VC and BCB advance they get more standard [...]

True for BCB but unfortunately MS is not very concerned with the standard.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2653084
Why do you say that?  it has become more standard in each release  (Although the fact that scope of a varable declared in a for loop still isn't right is good support for your point.)  MS had several representatives on the committee.  (Maybe they were just there to try to get the windows API included in the standard library.)
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question