Effective STL Directory

xiaoxiao2021-04-02  236

Since December last year, I spent 40 days of reading "Effective STL" book, and wrote the relevant reading notes, I am thinking about whether this part of the note is posted on the blog. Before this, please post the Effective STL directory and strongly recommend this book. If you want to deepen your understanding of STL, this book is essential. The book also needs to be referred to is "STL source code analysis". This catalog has related links.

Foreword

Thank you

Guide

container

Terms 1: Choose your container carefully

Terms 2: Careful to "container unrelated code" fantasy

Terms 3: Make the copy operation of the object in the container and correct

Terms 4: Use EMPTY instead of check size () is 0

Terms 5: Try to use interval member functions instead of their single element brothers

Terms 6: Be wary of C most angry analysis

Terpsis 7: When using the new pointer to the pointer, remember to delete before the destruction of the container

Terms 8: Containers that never build Auto_PTR

Terms 9: Carefully choose in the delete option

Terms 10: Pay attention to the agreement and constraints of the dispenser

Terms 11: Understand the correct usage of custom dispenser

Terms 12: Expectation Reality for STL Container Thread Security

Vector and String

Terms 13: Try to use Vector and String to replace the array of dynamic allocation

Terms 14: Use RESERVE to avoid unnecessary redistribution

Terms 15: Careful String Diversity Diversity

Terms 16: How to pass the data of Vector and String to the traditional API

Terms 17: Use "exchange skills" to repair excess capacity

Terms 18: Avoid using vector

Related container

Terms 19: Learn about the difference between equal and equivalent

Terms 20: Specify comparison types for the associated container of the pointer

Terms 21: Always let comparison functions return to false to equal values

Terms 22: Avoid modifying set and multiset keys

Terms 23: Consider using an orderly vector instead of associated container

Terms 24: Carefully choose between Map :: Operator [] and Map-Insert when it is more efficient.

Terms 25: Familiar with non-standard hash containers

Iterator

Terms 26: Try to use Iterator instead of const_iterator, reverse_iterator and const_reverse_iterator

Terms 27: Translate const_iterator into iterator with distance and advance

Terms 28: Learn how to get Iterator through Reverse_Iterator

Terms 29: Consider using ISTREAMBUF_ITERATOR when you need a character input

algorithm

Terms 30: Make sure the target interval is large enough

Terms 31: Understand your sorting

Terms 32: If you really want to delete something, just after the REMOVE algorithm is connected.

Terms 33: Beware of using similar REMOVE algorithms on a pointer

Terms 34: Note which algorithm requires an orderly interval

Terms 35: Comparison of simple negligible sketches by mismatch or lexicographical comparison

Terms 36: Understand the correct implementation of COPY_IF

Terms 37: Statify the residence with Accumulate or for_each

Imitation function, imitation function class, function, etc.

Terms 38: Design the imitation function class as the value transfer

Terms 39: Judgment with a pure function

Terms 40: Make the imitation functionality

Terms 41: Understand the reasons for using PTR_FUN, MEM_FUN and MEM_FUN_REF

Terms 42: Determine LESS to indicate Operator <.

Use STL programming

Terms 43: Try to call instead of handwriting cycle with algorithm

Terms 44: Try to use member functions to replace the same name algorithm

Terms 45: Note COUNT, FIND, Binary_Search, Lower_Bound, Upper_Bound and Equal_Range

Terms 46: Consider using the function object instead of the function as a parameter

Terms 47: Avoid generating only only code

Terms 48: Always #include appropriate header files

Terms 49: Learn to Crack Compiler Diagnostics Information about STL

Terms 50: Let you be familiar with the website about STL

bibliography

Appendix A: String comparison of regional settings and ignores

Appendix B: Precautions on the Microsoft STL platform

Glossary

index

转载请注明原文地址:https://www.9cbs.com/read-131320.html

New Post(0)