Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects simply to a non-technical, business audience. Over…
A standard template library (STL) is a software library that extends C++ standard library’s capabilities and provides a ready-made set of common classes for C++, including associative arrays and containers, which are used along with built-in and user-defined types that support elementary operations. The algorithms associated with STL are independent of containers and reduce the complexity of the library.
A standard template library uses templates to achieve the required results, and provides compile time polymorphism. STLs also include components such as functors, iterators and algorithm containers.
An STL includes sequence and associative containers. Standard sequence containers include deque, vector and list, while standard associative containers are multiset, map, multimap and set. Container adapters such as queue and stack are also containers with specific interfaces, which use other containers as implementation.
There are five different types of iterators within STL:
An STL includes algorithms to perform searching and sorting, each of which is implemented to require a certain level of iterator. STL also includes classes that overload the function operator and are called function objects, or functors. These aid in keeping and retrieving state information in functions passed to other functions.
Techopedia’s editorial policy is centered on delivering thoroughly researched, accurate, and unbiased content. We uphold strict sourcing standards, and each page undergoes diligent review by our team of top technology experts and seasoned editors. This process ensures the integrity, relevance, and value of our content for our readers.
Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.
What is AI Ethics? The field of AI ethics is about the rules and values guiding how artificial intelligence (AI)...
Maria WebbTechnology journalist
What is AI TRiSM? AI TRiSM (Trust, Risk, and Security Management) is a market segment for AI governance products and...
Margaret RouseTechnology Expert
What is Know Your Customer (KYC)? Know Your Customer (KYC) is the process that financial institutions such as banks use...
Nicole WillingTechnology Journalist
Trending NewsLatest GuidesReviewsTerm of the Day