?
Solved

Which is the best public domain STL?

Posted on 2000-03-21
9
Medium Priority
?
191 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
[X]
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
  • 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 300 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

764 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