Click for commercial
licensing information.
Scott Meyers Training Courses
An Introduction to TR1 and Boost
TR1 — "Technical Report 1" from the Library Subcommittee of the C++ Standardization Committee — specifies new functionality being added to standard C++. Much of the work behind TR1 was done at Boost, the best known and most highly respected repository for open-source, cross-platform, peer-reviewed C++ libraries. This seminar offers an intense, selective overview of TR1 and Boost library functionality. It's intense, because a lot of information is covered, and it's selective, because not all of TR1's 14 and Boost's 80+ libraries are examined.
TR1 and Boost library functionality is both powerful and immediately available, so every practicing C++ developer should be familiar with the material in this seminar.
Course Highlights
Participants will gain:
- An understanding of TR1 and how it relates to standard C++ and Boost.
- An overview of the capabilities and limitations of the most widely useful libraries in TR1.
- An examination of several important non-TR1 libraries available at Boost.
- A glimpse into library functionality likely to be part of TR2.
Who Should Attend
Systems designers, programmers, and technical managers involved in the design, implementation, and maintenance of software systems written in C++. Participants will get the most out of this seminar if they are comfortable with the major features of C++ and the STL (e.g., classes, templates, containers, iterators, etc.) and are familiar with the basics of reference counting, hash tables, and regular expressions.
Format
Lecture and question/answer. There are no hands-on exercises, but participants are welcome to use their computers to experiment with the course material as it is presented.
Length
One full day (six to seven lecture hours).
Detailed Topic Outline
- What is TR1?
- Relationship to Boost
- TR1 Smart Pointers:
- shared_ptr
- weak_ptr
- Likely implementation costs
- TR1 Hash Tables:
- Names: "hash_set" vs. "unordered_set", etc.
- Conceptual implementation
- Interface overview
- Writing custom hashing functions
- Controlling bucket count and load factor
- Iterating over buckets
- TR1 Regular Expressions:
- Regular expression syntaxes and options
- Searching and iterating over matches
- Searching and replacing
- TR1 Generalized Functors:
- Callable entities
- Specifying a calling interface
- Compatible signatures
- Callback example
- Additional functionality
- TR1 Binder:
- Limitations of standard binders
- Simple example uses
- Use with tr1::function
- More advanced uses
- TR1 Tuples:
- Interface overview
- Support for compile-time reflection
- Relationship to std::pair
- TR1 Fixed-Size Arrays:
- Interface overview
- Support for brace initialization
- Relationship to tr1::tuple
- Comparison to std::vector and C arrays
- TR2
- Boost Smart Pointers:
- scoped_ptr and scoped_array
- shared_array
- intrusive_ptr
- Summary of TR1 and Boost smart pointer characteristics
- Boost Static Assertions:
- Relationship to C++0x's static_assert
- Example uses at various scopes
- Boost Lambda:
- Compelling examples
- Where things break down
- Boost FileSystem:
- Platform-dependent and platform-independent paths
- Usage examples and caveats
- Boost Conversions
- lexical_cast
- numeric_cast
- polymorphic_cast and polymorphic_downcast
- Boost Format:
- Comparison to printf format
- Additional features
- Cost
- Boost Variant:
- Comparison to unions
- Interface overview
- Support for visitation
- Sources for Additional Information
For more information on this course, contact Scott directly.