What's the difference between “STL” and “C++ Standard Library”?

前端 未结 7 922
忘了有多久
忘了有多久 2020-11-21 07:37

Someone brought this article to my attention that claims (I\'m paraphrasing) the STL term is misused to refer to the entire C++ Standard Library instead of the part

7条回答
  •  耶瑟儿~
    2020-11-21 07:45

    In layman words: STL is part of Standard Library.

    C++ Standard Library is group into:

    1. Standard Functional Library -I/O, -String and character handling, -Mathematical, -Time, date, and localization, -Dynamic allocation, -Miscellaneous, -Wide-character functions

    2. Standard OOP and Generics Library -The Standard C++ I/O Classes -The String Class -The Numeric Classes -The STL Container Classes -The STL Algorithms -The STL Function Objects -The STL Iterators -The STL Allocators -The Localization library -Exception Handling Classes -Miscellaneous Support Library

    So if you are talking about STL as Standard Library, it is OK and just remember that STL implementations allow for generics and others are more specific to one type.

    Please refer to https://www.tutorialspoint.com/cplusplus/cpp_standard_library.htm

提交回复
热议问题