Advanced C++
C++ is one of the most widely used programming languages and is applied in a variety of domains, right from gaming to graphical user interface (GUI) programming and even operating systems. If you're looking to expand your career opportunities, mastering the advanced features of C++ is key.
The course begins with advanced C++ concepts by helping you decipher the sophisticated C++ type system and understand how various stages of compilation convert source code to object code. You'll then learn how to recognize the tools that need to be used in order to control the flow of execution, capture data, and pass data around. By creating small models, you'll even discover how to use advanced lambdas and captures and express common API design patterns in C++. As you cover later lessons, you'll explore ways to optimize your code by learning about memory alignment, cache access, and the time a program takes to run. The concluding lesson will help you to maximize performance by understanding modern CPU branch prediction and how to make your code cache-friendly.
After completing this course, you will be able to:
- Delve into the anatomy and workflow of C++
- Study the pros and cons of different approaches to coding in C++
- Test, run, and debug your programs
- Link object files as a dynamic library
- Use templates, SFINAE, constexpr if expressions and variadic templates
- Apply best practice to resource management
We also recommend that you have the following software installed in advance:
- Git latest version
- Browser: Google Chrome or Mozilla Firefox
- CMake
- Ninja
- Eclipse CDT and cmake4eclipse
- GoogleTest
For the optimal student experience, we recommend the following hardware configuration:
- Processor: Intel Core i5 or equivalent
- Memory: 4 GB RAM
- Storage: 5 GB available space
Lesson 1: Anatomy of Portable C++ Software
Managing C++ Projects
Writing Readable Code
Lesson 2A: No Ducks Allowed – Types and Deduction
C++ Types
Creating User Types
Structuring our Code
Lesson 2B: No Ducks Allowed – Templates and Deduction
Inheritance, Polymorphism, and Interfaces
Templates – Generic Programming
Type Aliases – typedef and using
Class Templates
Lesson 3: No Leaks Allowed – Exceptions and Resources
Exceptions in C++
RAII and the STL
Move Semantics
Name Lookup
Caveat Emptor
Lesson 4: Separation of Concerns – Software
Architecture, Functions, and Variadic Templates
Function Objects and Lambda Expressions
Variadic Templates
Lesson 5: The Philosophers' Dinner – Threads and
Concurrency
Synchronous, Asynchronous, and Threaded Execution
Review Synchronization, Data Hazards, and Race Conditions
Future, Promises, and Async
Lesson 6: Streams and I/O
File I/O Implementation Classes
String I/O Implementation
I/O Manipulators
Making Additional Streams
Using Macros
Lesson 7: Everybody Falls, It's How You Get Back Up –
Testing and Debugging
Assertions
Unit Testing and Mock Testing
Understanding Exception Handling
Breakpoints, Watchpoints, and Data Visualization
Lesson 8: Need for Speed – Performance and Optimization
Performance Measurement
Runtime Profiling
Optimization Strategies
Cache Friendly Code