Advanced C++ Lessons
Next
Advanced C++ Lessons
Table of Contents
1. Constant Magic
Arrays and string literals
When constant is stored
2. Exceptions
What is exceptional?
Goals of exception handling
Setjump/longjump
Components of exception handling
Exception hierarchies
Exceptions in the standard library
Constructors
Destructors
Resource problems
Exception specification
Exception safety
3. References
The Concept Behind Reference
Reference in earlier programming languages
Scope and Life Rules
Return type
Examples for Reference return type
Difference between Reference and Pointer
Parameter Passing
Optimalization
Proxy objects
4. Constructors and destructors
5. Advanced Memory Handling
Storage types in C++
Constant Data
Automatic Life
Dynamic Life
Static Life
Local Static Variables
Array Elemenst
Life of Object Attributes
Union Member
Temporary
New and Delete
Operators
Overloading the New and Delete operators
Extra Parameters for New and Delete
Auto_ptr class
Usage of Auto_ptr class
The Definition of Auto_ptr
Problems with Auto_ptr
Memory Handling Strategies
Auto_ptr as Class Member
Arrays
Arrays are not Polymorphic
Arrays and Auto_ptr
Array Delete Adapter
Objects with Special Storage Restrictions
Objects only in the Heap
Objects not in the Heap
6. Template Metaprogramming
Template basics
Tempalte basics
Possible solutions
Instantiation
Instantiation, template argument deduction
Explicit specialization
Template overloading
Template classes
Parametric polymorphism
Template class specialization
Partial specialization
Default Parameter
Generics in other languages
ADA generic
Functional languages
Generic in Java
Tricky basics
Dependent name
Using this
Member templates
Template template parameters
Explicit call of default constructor
Explicite Template Instantiation
C++ Template Metaprogramming
Metaprogramming
Partial evaluation
Static metaprogramming
Turing-completeness of C++ templates
Factorial function
Meta Control Structures
Template Recursion
Metafunctions as Parameter
Problems with lazy instantiation
Motivation
Expression Templates
Uneffective object-oriented code
Recursive Templates
Minimal Implementation
Expression Templates in Java
Bubble Sort
Mixins
What is a Mixin?
Mixin issues
Liskov substitutional principle
Traits
An example for traits
Policy classes
More traits
Character Trait
Case Insensitive String with Traits
Problem with traits
Loki
Int2Type
Type2Type
Type Select
Typelist
Loki Utilities
Typelist Manipulation
Usage Example for Loki
Static interface checking
Interface Checking
Promotion
Conversion Checking
Inheritance
Compile-Time Assertion
7. STL fundamentals
8. Strings
9. Compiling and Linking
Compile-time dependences in C++"
Removing Unnecsessary Inheritance
The PIMPL idiom
Codeblow
Using C and C++ together
Interpositioning
Stupid linker?
Order of linking
Dynamic linking
10. Input-Output Library
Basics
The I/O hierarchy
The elements of iostreams
Redirection
Manipulators
Define your own streambuffer
11. Boost Libraries
Bind
Usage of bind
Function objects
Example
Reference wrapper
Tuple
Tuple construction
Tuple operations
Input/Output
Array
Usage
Design