Effective use of STL. Library Programmer

Affiliates: 0,01 $ — how to earn
Pay with:
i agree with "Terms for Customers"
Sold: 2
Refunds: 0

Uploaded: 10.02.2006
Content: efect_stl.zip (1144,17 kB)

Description

Piter
Year: 2002
Pages: 224
Format: DJVU

Chapter 1 Containers
Tip 1. careful approach to the choice of container
Tip 2. Beware of illusions container-independent code
Tip 3. Implement quick and correct copy objects in containers
Tip 4. Call empty instead of comparing the size () with a zero
Tip 5. Use the interval instead of the single-element functions
Tip 6. Beware of strange lexical analysis of C ++
Tip 7. When using containers of pointers, for which the caller new, do not forget to call delete for pointers before destroying the container
Tip 8. Never create containers containing auto_ptr
Tip 9. Carefully choose the delete operation
Tip 10. Keep in mind the rules and restrictions allocators
Council 11. Consider the scope of custom allocators
Council 12. It is reasonable to estimate thread safety STL containers

Chapter 2 Containers vector and string
Tip 13. Use vector and string instead of dynamic arrays
Tip 14. Use the reserve to prevent unnecessary operations reallocation
Tip 15. Keep in mind the differences in the implementation of string
Council 16. Learn to transfer data vector and string functions inherited interface
Tip 17. Use the "focus on permutation" to reduce capacity
Tip 18. Avoid vector

Chapter 3 Associative Containers
Tip 19. Keep in mind the difference between equality and equivalence
Council 20. Decide on the type of comparison for associative container containing pointers
Tip 21. Make sure to compare function returns false in the case of a tie
Tip 22. Do not change the key, "on the spot" in containers set and multiset
Council 23. Consider replacing associative containers sorted vectors
Tip 24. Choose carefully between map :: operator [] and map :: insert
Council 25. Study nonstandard hashed containers

Chapter 4 iterators
Tip 26. Try to use iterator instead const_iterator, reverse_iterator and const_reverse_iterator
Tip 27. Use the distance and advance to convert const_iterator in iterator
Council 28. Learn to use the base
Council 29. Consider using istreambuf_iterator when character input

Chapter 5 Algorithms
Tip 30. Make sure that the receiving slot has a sufficient size
Tip 31. Keep in mind the existence of different means of sorting
32. The Council calls Accompany remove-like algorithms calling erase
Council 33. Be careful when using remove-like algorithms with containers of pointers
Council 34. Remember what algorithms receive assorted intervals
35. The Council implements a simple string comparison insensitive with mismatch or lexicographical_compare
36. The Board correctly implement copy_if Council 37. Use for_each accumulate or to summarize interval data

Chapter 6, functors and classes of functions
Council 38. Design classes of functors for transmission by value
Council 39. Implement predicates as "pure" functions
Council 40. Classes functors must be adaptable
Council 41. Understand what is needed ptr_fun, mem_fun and mem_fun_ref
Tip 42. Make sure that the design mean less operator <
Chapter 7 Programming in STL
43. The Council uses algorithms instead of cycles
Tip 44. Use the functions of containers instead of like algorithms
Council 45. Differentiate algorithms count, find, binary_search, lower_bound, upper_bound and equal_range
Council 46. Transfer algorithms function objects instead of functions
Tip 47. Avoid "unreadable" code
Tip 48. Always include the necessary headers
Council 49. Learn to read compiler messages
Council 50. Remember the web-sites dedicated to STL
Site SGI STL
Site STLport
Site Boost

Additional information

Feedback

0
No feedback yet.
Period
1 month 3 months 12 months
0 0 0
0 0 0
In order to counter copyright infringement and property rights, we ask you to immediately inform us at support@plati.market the fact of such violations and to provide us with reliable information confirming your copyrights or rights of ownership. Email must contain your contact information (name, phone number, etc.)