Solved

Which is the best public domain STL?

Posted on 2000-03-21
9
183 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
 
LVL 22

Expert Comment

by:nietod
ID: 2645026
Sound's reasonable.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now