skip to content
Effective STL : 50 specific ways to improve your use of the standard template library Preview this item
ClosePreview this item
Checking...

Effective STL : 50 specific ways to improve your use of the standard template library

Author: Scott Douglas Meyers
Publisher: Boston [u.a.] : Addison-Wesley, 2001.
Series: Addison-Wesley professional computing series.
Edition/Format:   Print book : EnglishView all editions and formats
Database:WorldCat
Summary:

Providing information on C++'s Standard Template Library, this book shows you how to use it. It includes: advice on choosing among standard STL containers, nonstandard STL containers, and non-STL  Read more...

Rating:

(not yet rated) 0 with reviews - Be the first.

Subjects
More like this

 

Find a copy in the library

&AllPage.SpinnerRetrieving; Finding libraries that hold this item...

Details

Document Type: Book
All Authors / Contributors: Scott Douglas Meyers
ISBN: 0201749629 9780201749625
OCLC Number: 248421339
Description: XVIII, 260 S ; 24 cm.
Contents: Preface xiAcknowledgments xvIntroduction 1Chapter 1: Containers 11Item 1: Choose your containers with care. 11Item 2: Beware the illusion of container-independent code. 15Item 3: Make copying cheap and correct for objects in containers. 20Item 4: Call empty instead of checking size() against zero. 23Item 5: Prefer range member functions to their single-element counterparts. 24Item 6: Be alert for C++'s most vexing parse. 33Item 7: When using containers of newed pointers, remember to delete the pointers before the container is destroyed. 36Item 8: Never create containers of auto_ptrs. 40Item 9: Choose carefully among erasing options. 43Item 10: Be aware of allocator conventions and restrictions. 48Item 11: Understand the legitimate uses of custom allocators. 54Item 12: Have realistic expectations about the thread safety of STL containers. 58Chapter 2: vector and string 63Item 13: Prefer vector and string to dynamically allocated arrays. 63Item 14: Use reserve to avoid unnecessary reallocations. 66Item 15: Be aware of variations in string implementations. 68Item 16: Know how to pass vector and string data to legacy APIs. 74Item 17: Use "the swap trick" to trim excess capacity. 77Item 18: Avoid using vector. 79Chapter 3: Associative Containers 83Item 19: Understand the difference between equality and equivalence. 83Item 20: Specify comparison types for associative containers of pointers. 88Item 21: Always have comparison functions return false for equal values. 92Item 22: Avoid in-place key modification in set and multiset. 95Item 23: Consider replacing associative containers with sorted vectors. 100Item 24: Choose carefully between map::operator[] and map::insert when efficiency is important. 106Item 25: Familiarize yourself with the nonstandard hashed containers. 111Chapter 4: Iterators 116Item 26: Prefer iterator to const_iterator, reverse_iterator, and const_reverse_iterator. 116Item 27: Use distance and advance to convert const_iterators to iterators. 120Item 28: Understand how to use a reverse_iterator's base iterator. 123Item 29: Consider istreambuf_iterators for character by character input. 126Chapter 5: Algorithms 128Item 30: Make sure destination ranges are big enough. 129Item 31: Know your sorting options. 133Item 32: Follow remove-like algorithms by erase if you really want to remove something. 139Item 33: Be wary of remove-like algorithms on containers of pointers. 143Item 34: Note which algorithms expect sorted ranges. 146Item 35: Implement simple case-insensitive string comparisons via mismatch or lexicographical_compare. 150Item 36: Understand the proper implementation of copy_if. 154Item 37: Use accumulate or for_each to summarize ranges. 156Chapter 6: Functors, Functor Classes, Functions, etc. 162Item 38: Design functor classes for pass-by-value. 162Item 39: Make predicates pure functions. 166Item 40: Make functor classes adaptable. 169Item 41: Understand the reasons for ptr_fun, mem_fun, and mem_fun_ref. 173Item 42: Make sure less means operator<. 177Chapter 7: Programming with the STL 181Item 43: Prefer algorithm calls to hand-written loops. 181Item 44: Prefer member functions to algorithms with the same names. 190Item 45: Distinguish among count, find, binary_search, lower_bound, upper_bound, and equal_range. 192Item 46: Consider function objects instead of functions as algorithm parameters. 201Item 47: Avoid producing write-only code. 206Item 48: Always #include the proper headers. 209Item 49: Learn to decipher STL-related compiler diagnostics. 210Item 50: Familiarize yourself with STL-related web sites. 217Bibliography 225Appendix A: Locales and Case-Insensitive String Comparisons 229Appendix B: Remarks on Microsoft's STL Platforms 239Index 245
Series Title: Addison-Wesley professional computing series.
Responsibility: Scott Meyers.

Reviews

User-contributed reviews
Retrieving GoodReads reviews...
Retrieving DOGObooks reviews...

Tags

Be the first.
Confirm this request

You may have already requested this item. Please select Ok if you would like to proceed with this request anyway.

Linked Data


Primary Entity

<http://www.worldcat.org/oclc/248421339> # Effective STL : 50 specific ways to improve your use of the standard template library
    a schema:Book, schema:CreativeWork ;
   library:oclcnum "248421339" ;
   library:placeOfPublication <http://id.loc.gov/vocabulary/countries/mau> ;
   library:placeOfPublication <http://experiment.worldcat.org/entity/work/data/53027682#Place/boston_u_a> ; # Boston u.a.
   schema:about <http://id.worldcat.org/fast/843286> ; # C++ (Computer program language)
   schema:about <http://experiment.worldcat.org/entity/work/data/53027682#Topic/stl> ; # STL
   schema:about <http://experiment.worldcat.org/entity/work/data/53027682#Topic/stl_swd_id_44113262> ; # STL ; SWD-ID: 44113262
   schema:about <http://experiment.worldcat.org/entity/work/data/53027682#Topic/standard_template_library> ; # Standard template library
   schema:about <http://experiment.worldcat.org/entity/work/data/53027682#Topic/standard_template_library_computer_file> ; # Standard template library--Computer file
   schema:about <http://dewey.info/class/005.133/> ;
   schema:about <http://experiment.worldcat.org/entity/work/data/53027682#Topic/c++_swd_id_41939098> ; # C++ ; SWD-ID: 41939098
   schema:bookFormat bgn:PrintBook ;
   schema:creator <http://viaf.org/viaf/116082> ; # Scott Douglas Meyers
   schema:datePublished "2001" ;
   schema:exampleOfWork <http://worldcat.org/entity/work/id/53027682> ;
   schema:inLanguage "en" ;
   schema:isPartOf <http://experiment.worldcat.org/entity/work/data/53027682#Series/addison_wesley_professional_computing_series> ; # Addison-Wesley professional computing series.
   schema:name "Effective STL : 50 specific ways to improve your use of the standard template library" ;
   schema:productID "248421339" ;
   schema:publication <http://www.worldcat.org/title/-/oclc/248421339#PublicationEvent/boston_u_a_addison_wesley_2001> ;
   schema:publisher <http://experiment.worldcat.org/entity/work/data/53027682#Agent/addison_wesley> ; # Addison-Wesley
   schema:workExample <http://worldcat.org/isbn/9780201749625> ;
   wdrs:describedby <http://www.worldcat.org/title/-/oclc/248421339> ;
    .


Related Entities

<http://experiment.worldcat.org/entity/work/data/53027682#Agent/addison_wesley> # Addison-Wesley
    a bgn:Agent ;
   schema:name "Addison-Wesley" ;
    .

<http://experiment.worldcat.org/entity/work/data/53027682#Series/addison_wesley_professional_computing_series> # Addison-Wesley professional computing series.
    a bgn:PublicationSeries ;
   schema:hasPart <http://www.worldcat.org/oclc/248421339> ; # Effective STL : 50 specific ways to improve your use of the standard template library
   schema:name "Addison-Wesley professional computing series." ;
   schema:name "Addison-Wesley professional computing series" ;
    .

<http://experiment.worldcat.org/entity/work/data/53027682#Topic/c++_swd_id_41939098> # C++ ; SWD-ID: 41939098
    a schema:Intangible ;
   schema:name "C++ ; SWD-ID: 41939098" ;
    .

<http://experiment.worldcat.org/entity/work/data/53027682#Topic/standard_template_library> # Standard template library
    a schema:Intangible ;
   schema:name "Standard template library" ;
    .

<http://experiment.worldcat.org/entity/work/data/53027682#Topic/standard_template_library_computer_file> # Standard template library--Computer file
    a schema:Intangible ;
   schema:name "Standard template library--Computer file" ;
   schema:name "Standard Template Library--Computer file" ;
    .

<http://experiment.worldcat.org/entity/work/data/53027682#Topic/stl_swd_id_44113262> # STL ; SWD-ID: 44113262
    a schema:Intangible ;
   schema:name "STL ; SWD-ID: 44113262" ;
    .

<http://id.worldcat.org/fast/843286> # C++ (Computer program language)
    a schema:Intangible ;
   schema:name "C++ (Computer program language)" ;
    .

<http://viaf.org/viaf/116082> # Scott Douglas Meyers
    a schema:Person ;
   schema:familyName "Meyers" ;
   schema:givenName "Scott Douglas" ;
   schema:name "Scott Douglas Meyers" ;
    .

<http://worldcat.org/isbn/9780201749625>
    a schema:ProductModel ;
   schema:isbn "0201749629" ;
   schema:isbn "9780201749625" ;
    .

<http://www.worldcat.org/title/-/oclc/248421339>
    a genont:InformationResource, genont:ContentTypeGenericResource ;
   schema:about <http://www.worldcat.org/oclc/248421339> ; # Effective STL : 50 specific ways to improve your use of the standard template library
   schema:dateModified "2017-09-02" ;
   void:inDataset <http://purl.oclc.org/dataset/WorldCat> ;
    .


Content-negotiable representations

Close Window

Please sign in to WorldCat 

Don't have an account? You can easily create a free account.