US / UK-EMEA / Contact Ask DevelopMentor a Question800.699.1932

Effective STL Programming Training

(FW295) 2 Day Course, $1595
 
Upcoming Classes:

What You Will Learn

Course Highlights

Course Details

Dates & Locations

The STL is revolutionary, but learning to use it well is a challenge. This seminar, based on Meyers' Effective STL, reveals the critical rules of thumb employed by the experts -- the things they almost always do or almost always avoid doing -- to get the most out of the library.

What You Will Learn

Course Highlights

Course Details

Dates & Locations

Participants will gain:
  • Insights into the behavior of sequence, associative, contiguous-memory, and node-based containers, including new containers specified in TR1.
  • Knowledge of techniques to use both containers and algorithms most efficiently.
  • An understanding of the applications and limitations of STL allocators.

What You Will Learn

Course Highlights

Course Details

Dates & Locations

  • Preliminaries:
    • TR1 and Boost
    • The behavior of remove
      • The erase-remove idiom
      • remove and containers of pointers
    • Algorithms vs. same-named member functions
    • Equality vs. equivalence
  • Containers:
    • Choose your containers with care
      • Sequence containers vs. associative containers
      • Contiguous-memory containers vs. node-based containers
      • Ways in which containers differ
    • Beware the illusion of container-independent code
      • Using abstraction to preserve flexibility
    • Why range member functions are preferable to their single-element counterparts
    • Avoiding resource leaks when storing pointers
      • Why containers should never hold auto_ptrs
    • Choosing among erasing options:
      • Erasing simple values
      • Erasing elements satisfying a predicate
      • Erasing and performing arbitrary actions
    • Thread-safety and STL containers
  • vector and string
    • Why vector and string are preferable to dynamically allocated arrays
    • Use reserve to minimize memory reallocations in vector and string.
      • Using "the swap trick" to perform "shrink to fit."
    • The wide variety of string implementations
    • Using vector and string with C APIs.
  • Associative Containers:
    • Why comparison functions should always return false for equal values
    • Issues involved in in-place modification of set and multiset elements
    • Why sorted vectors can be superior to sets and maps for lookup-intensive applications.
      • std::binary_search vs. std::lower_bound vs. std::equal_range
    • An overview of containers based on hash tables
  • Algorithms:
    • Choosing among sort, stable_sort, partition, stable_partition, and nth_element
    • Understanding the algorithms that work with sorted ranges
    • Implementing copy_if
      • The adaptability problem
      • Adding adaptability via std::ptr_fun and std::tr1::function
  • Functors, Functor Classes, Functions, etc.:
    • Why functor classes should be designed for pass-by-value
      • How std::tr1::shared_ptr can help
    • Why predicates should be pure functions
    • Why functor classes should be adaptable
      • TR1 and adaptability
    • Why less should always mean operator<
  • Programming with the STL:
    • Why algorithm calls are usually preferable to hand-written loops:
      • Efficiency
      • Correctness
      • Comprehensibility
      • The Boost Lambda library
    • Why function objects are more efficient than functions
    • Choosing among count, find, binary_search, lower_bound, upper_bound, and equal_range
    • #include-related portability headaches
  • Allocators
    • Original goals and ultimate limitations
    • Allocators vs. operators new/new[ ]/delete/delete[ ]
    • Allocators and node-based containers
      • rebind
    • Legitimate uses of allocators
    • A shared-memory allocator
    • A complete sample allocator
  • Further Information

What You Will Learn

Course Highlights

Course Details

Dates & Locations

Upcoming Dates & Locations

There are no upcoming scheduled engagments of this course. We can schedule an on-site event at your convenience.
Ready?
Connect
Signup for our Free Newsletter!
Latest news
Twitter Feed MORE
Got an email from a developer in Holland about my Onion Architecture blog post http://t.co/Z5DTvJob Nice to have a worldwide audience! #dm
1 day ago (details)
There is something to this statement: Why Quit? Because They Have Bigger Monitors http://t.co/9FrGETG5 #dm (via @mkennedy)
2 days ago (details)
Testimonials
  • All the content was presented in a very clear manner and we got to the important points quickly with enough context to understand the content and how it would be used. Jenny L.