Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the specific differences between the original STL and those parts of it that ended up in the C++ Standard Library?

Tags:

c++

stl

I'd like to know what the specific differences are between the STL as released by SGI and the ISO C++ standard library. Prompted by this question and not at all answered by this question.

Some differences are obvious, such as the slist and hash_set classes that never made it into the standard. I'm also looking for more subtle differences, such as return value/parameter differences on methods, or different complexity requirements, or different iterator invalidation conditions.

like image 884
Mark Ransom Avatar asked Mar 10 '11 21:03

Mark Ransom


People also ask

What is STL how is it different from the C++ Standard Library?

The Standard Template Library (STL) is a software library originally designed by Alexander Stepanov for the C++ programming language that influenced many parts of the C++ Standard Library. It provides four components called algorithms, containers, functions, and iterators.

What are the major components of STL?

STL contains five kinds of components: containers, iterators, algorithms, function objects and allocators.

What is STL and what are the components of it explain them?

The Standard Template Library (STL) is a set of C++ template classes to provide common programming data structures and functions such as lists, stacks, arrays, etc. It is a library of container classes, algorithms, and iterators. It is a generalized library and so, its components are parameterized.


1 Answers

SGI STL stuff "missing" in the C++ standard includes

  • slist
  • bit_vector
  • hash_set, hash_map, hash_multiset, hash_multimap and everything pertaining to hash functions
  • rope
  • iota
  • lexicographical_compare_3way
  • random_sample and random_sample_n
  • the MonoidOperation and Trivial Iterator concepts
  • a host of backward compat headers such as algo.h

... and I bet you can find a few more.

like image 148
Fred Foo Avatar answered Oct 07 '22 14:10

Fred Foo