Effective STL Chinese version (Daquan)

Source: Internet
Author: User

Effective STL Chinese version (Daquan)

Winter

In the case of STL, programmers have three realms, starting with STL, then understanding STL, and finally supplementing STL. Effective STL is a very good book to help you better understand STL, whose author is the author of "Effective C + +". If you have an initial understanding of STL containers, iterators, algorithms, and functions, and want to better understand the STL, then the effective STL is your best choice. There is also a part of the link is not found, if you can not find I will try to translate it myself:)

    • Objective
Container
    • Article 1: Carefully select the container you want
    • Article 2: Beware of the "container-independent Code" illusion
    • Clause 3: Make the copy operation of the object in the container lightweight and correct
    • Article 4: Use empty instead of checking if size is 0
    • Article 5: Try to use range member functions instead of their single-element brothers
    • Article 6: Beware of C + + and its confusing analysis
    • Article 7: When using a new pointer container, remember to delete those pointers before the container is destroyed
    • Clause 8: Never put auto_ptr in a container new
    • Clause 9: Carefully select the delete option
    • Article 10: Beware of allocator agreements and constraints
    • Article 11: Understanding the Orthodox use of custom allocator
    • Article 12: The expectation of thread safety for STL containers is realistic
Vector and string
    • Article 13: Use vectors and strings as much as possible in place of dynamic request arrays
    • Article 14: Use reserve to avoid unnecessary memory reallocation
    • Article 15: Beware of changes in the implementation of string
    • Article 16: How to pass the vector and string data to the traditional API
    • Article 17: Using "switching techniques" to correct excessive capacity
    • Clause 18: Avoid using vector<bool>
Associative containers
    • Article 19: Understanding the difference between equality and equivalence
    • Clause 20: Specify the comparison type for the associated container that contains the pointer
    • Article 21: Always let the comparison function return false for equal values
    • Clause 22: Avoid modification of Set and Multiset key values
    • Article 23: Consider using a sorted vector instead of an associative container
    • Clause 24: Try to replace map::operator with Map::insert when efficiency is critical
    • Article 25: Familiarize yourself with non-standard hash containers
Iterators
    • Clause 26: Try to use iterator instead of const_iterator,reverse_iterator and ...
    • Article 27: Use distance and advance to convert const_iterators into iterators
    • Article 28: Learn how to get iterator from Reverse_iterator base
    • Clause 29: Use Istreambuf_iterator when one character input is required
Algorithm
    • Clause 30: Ensure that the scope of purpose is large enough
    • Article 31: Understanding your sort operation new
    • Clause 32: If you really want to delete something, the remove-like algorithm immediately after the erase
    • Article 33: Beware of algorithms that use remove-like in containers that contain pointers
    • Article 34: Notice which algorithms require a sorted range
    • Clause 35: Simple case-insensitive string comparison via mismatch or lexicographical_compare
    • Clause 36: Use NOT1 and remove_copy_if to express copy_if
    • Article 37: Statistical sequences using accumulate or for_each
Imitation functions, functor classes, functions, etc.
    • Article 38: Design of the pseudo-function class as a value-passing
    • Article 39: Do predicate with pure functions
    • Article 40: Enhancing the adaptability of the imitated function class
    • Article 41: Clarifying the difference between Ptr_fun, Mem_fun and Mem_fun_ref
    • Clause 42: Make sure less is the meaning of operator<
Programming with STL
    • Article 43: Try to replace the handwritten loop new with algorithmic calls
    • Article 44: Try to replace the same name algorithm with member functions
    • Article 45: Note the difference between count, find, Binary_search, Lower_bound, Upper_bound, and Equal_range new
    • Article 46: Consider using function objects instead of functions as parameters of the algorithm
    • Article 47: Avoid generating write-only code
    • Article 48: Always include the appropriate header file
    • Article 49: Learn to hack STL-related compiler error messages
    • Article 50: Familiarize yourself with the STL-related web

Related article: effective STL English ebook download

Effective STL Chinese version (Daquan)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.