- Mastering C++ Programming
- Jeganathan Swaminathan
- 217字
- 2021-07-02 18:28:48
The Standard Template Library architecture
The C++ Standard Template Library (STL) offers ready-made generic containers, algorithms that can be applied to the containers, and iterators to navigate the containers. The STL is implemented with C++ templates, and templates allow generic programming in C++.
The STL encourages a C++ developer to focus on the task at hand by freeing up the developer from writing low-level data structures and algorithms. The STL is a time-tested library that allows rapid application development.
The STL is an interesting piece of work and architecture. Its secret formula is compile-time polymorphism. To get better performance, the STL avoids dynamic polymorphism, saying goodbye to virtual functions. Broadly, the STL has the following four components:
- Algorithms
- Functors
- Iterators
- Containers
The STL architecture stitches all the aforementioned four components together. It has many commonly used algorithms with performance guarantees. The interesting part about STL algorithms is that they work seamlessly without any knowledge about the containers that hold the data. This is made possible due to the iterators that offer high-level traversal APIs, which completely abstracts the underlying data structure used within a container. The STL makes use of operator overloading quite extensively. Let's understand the major components of STL one by one to get a good grasp of the STL conceptually.
- Oracle從入門到精通(第3版)
- 數字媒體應用教程
- Mastering Adobe Captivate 2017(Fourth Edition)
- 圖解Java數據結構與算法(微課視頻版)
- 編程珠璣(續)
- Internet of Things with Intel Galileo
- Learning Python Design Patterns(Second Edition)
- Expert Android Programming
- Visual C++開發入行真功夫
- JBoss:Developer's Guide
- Hands-On JavaScript for Python Developers
- C++程序設計
- 軟件再工程:優化現有軟件系統的方法與最佳實踐
- Natural Language Processing with Python Cookbook
- Learn C Programming