Winter finally found the complete Chinese version of "Effective STL", dedication to everyone. The authors explain how to combine STL components to get the biggest benefits in the design of the library. Such information allows you to develop simple and direct solutions to simple, direct problems, and help you design an elegant way to more complex issues. I describe the common STL use errors and give you how to avoid them. That helps you hide the flash resource leakage, unmistable code and undefined behavior. I discussed the way to optimize the code, so you can make STL express as fast and smooth as it should. This book author is Scott Meyers, translated by Gong Minmin.
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: Understanding the Cause Terms Using PTR_FUN, MEM_FUN and MEM_FUN_REF 42: Determine LESS
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
About this e-book
related articles
Effective STL e-book Download Effective STL Chinese version (other person translation)