Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Standard Template Library
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Software library for the C++ programming language}} {{Not to be confused with|C++ Standard Library}}{{Other uses|STL (disambiguation){{!}}STL}} {{Use dmy dates|date=October 2020}} {{C++ Standard library}} The '''Standard Template Library''' ('''STL''') is a [[Library (computer science)|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 ''[[Algorithm (C++)|algorithm]]s'', ''[[Container (data structure)|containers]]'', ''[[Function object|functors]]'', and ''[[iterator]]s''.<ref>{{cite book|last=Holzner|first=Steven|title=C++ : Black Book|year=2001|publisher=Coriolis Group|location=Scottsdale, Ariz.|isbn=1-57610-777-9|page=648|quote=The STL is made up of ''containers'', ''iterators'', ''function objects'', and ''algorithms''}}</ref> The STL provides a set of common [[C++ classes|classes]] for C++, such as containers and [[associative array]]s, that can be used with any built-in type or user-defined type that supports some elementary operations (such as copying and assignment). STL algorithms are independent of containers, which significantly reduces the complexity of the library. The STL achieves its results through the use of [[template (programming)|templates]]. This approach provides [[compile-time polymorphism]] that is often more efficient than traditional [[Polymorphism in object-oriented programming|run-time polymorphism]]. Modern C++ [[compiler]]s are tuned to minimize abstraction penalties arising from heavy use of the STL. The STL was created as the first library of generic algorithms and data structures for C++, with four ideas in mind: [[generic programming]], [[Abstraction (computer science)|abstractness]] without loss of efficiency, the [[Von Neumann architecture|Von Neumann computation model]],<ref name="stltutorial">{{Cite book | last = Musser | first = David | title = STL tutorial and reference guide: C++ programming with the standard template library | publisher = [[Addison Wesley]] | year = 2001 | isbn = 0-201-37923-6 }}</ref> and [[value semantics]]. The STL and the [[C++ Standard Library]] are two distinct entities.<ref>{{cite web|url=https://stackoverflow.com/a/5205571|title=What's the difference between "STL" and "C++ Standard Library"?|author=Lightness Races in Orbit|date=5 March 2011|publisher=Stack Overflow|access-date=21 October 2021}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)