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.
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 TC!) 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 TC!)
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 TC!) 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.