I know that some C++ Standard Library headers are originated from the STL, such as vector
. But I'm failing to find an up-do-date list of STL headers which are still not incorporated by the Standard Library. Do they exist?
PS: I would like to have them listed, and also to know if all major implementations include them or where to get them, if possible.
In layman words: STL is part of Standard Library.
Note that the term "STL" or "Standard Template Library" does not show up anywhere in the ISO 14882 C++ standard. So referring to the C++ standard library as STL is wrong, ie, STL and C++ Standard Library are 2 different things with the former being the subset of the latter.
Note the part of the C++ Standard Library which makes use of templates such as <vector> , string> , <map> , etc is header-only library. Actually templates (class templates and function templates) cannot be compiled into static or dynamic library to be linked to programs.
Note, this is a function by function break down, rather than a by header breakdown, because it seems to be more useful.
If we examine SGI's documentation of the STL we find the following:
slist
has been renamed std::forward_list
.bit_vector
has been replaced by a template specification of std::vector<bool>
. The implementation of this may (not must) optimize for space in the way that bit_vector
does.hash_set
and friends are now spelled like unordered_set
. Functionality seems to be the same. (Thanks T.C.!)rope
is missing. There is no equivalent data structure in the standard library. I could not find a relevant WG21 discussion on the topic.sequence_buffer
is missing, because this was primarily used for back inserting a rope
.random_sample
and random_sample_n
are missing. The reason is discussed in N3547:
After WG21 consideration at the Sophia-Antipolis meeting, Austern updated the proposal. Among other changes, he withdrew [
random_sample
andrandom_sample_n
]: “The LWG was concerned that they might not be well enough understood for standardization. . . . It may be appropriate to propose those algorithms for TR2” [ Aus08b ]. The wiki minutes of the discussion are equally terse: “Bjarne feels rationale is insufficient. PJ worries we will get it wrong. Lawrence worries that people will roll their own and get it wrong. Good candidate for TR2” [ LWG08 ]. The subsequent vote regarding these proposed algorithms achieved a solid LWG consensus (10-1, 2 abs.) in favor of their future inclusion in a Technical Report (now termed a Technical Specification)
A version of the random_sample_n
algorithm has made it to the Library Fundamentals TS and is called std::experimental::sample
, the latest iteration of the proposal N3925 was adopted in 2014-02 but remains not yet part of the standard, I suppose we'll see in in C++17. (Thanks T.C.!)
lexicographical_compare_3way
is missing. It was seen as "not important enough" to standardize according to N2666.power
is spelled pow
and does not have the generalized capabilities that power
does.identity
, project1st
, project2nd
, select1st
and select2nd
never made it to standardization. I could not find a discussion regarding why.subtractive_rng
is missing as well. Presumptively because <random>
would be superseding this problem space.binder1st
, binder2nd
, ptr_fun
, pointer_to_unary_function
, pointer_to_binary_function
, mem_fun
(and friends), unary_compose
, and binary_compose
are missing or deprecated. They are more or less superseded by std::bind
and friends.construct
and destroy
have been moved into the allocator
class and do not exist as standalone functions. (Thanks T.C.!)temporary_buffer
is missing. But get_temporary_buffer
and return_temporary_buffer
are available. I haven't been able to find out exactly why, but what chatter I have ran across seems to imply that it's broken in some way pretty fundamentally, and lots of people have been trying to fix it. Exactly what and how remains a mystery to me.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With