What is the difference between the standard library and the standard template library?

瘦欲@ 提交于 2019-12-20 09:49:43

问题


I keep seeing reference to both the C++ standard Library and the C++ Standard Template Library (STL). What is the difference between them? Wikipedia mentions that they share some headers but that's about it.


回答1:


The Standard Template Library (STL) is a library of containers, iterators, algorithms, and function objects, that was created by Alexander Stepanov; the SGI website has the canonical implementation and documentation.

The standard library is the library that is part of C++; it includes most of the Standard Template Library (STL).

In common usage, "STL" is also used to refer to the parts of the C++ standard library that come from or are derived from the actual SGI STL. For example, people often use "STL" to refer to std::vector and the rest of the containers in the C++ standard library, since they originated in the SGI STL.



来源:https://stackoverflow.com/questions/4064010/what-is-the-difference-between-the-standard-library-and-the-standard-template-li

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!