Course information at the bottom of the page.
These notes cover CS 246E in Fall 2021. The original notes from Fall 2017 can be found here, by Clayton Halim
The textbook used is Stroustrup, Bjarne. The C++ Programming Language, 4th edition, Addison Wesley, reading sections are referenced to this book.
- Modules (C++20)
- If / Switch Initialization (C++17)
- The Spaceship Operator (C++20)
- Structure Bindings (C++17)
- Class Template Argument Deduction (C++17)
- Range Abstraction (C++20)
- Unions Revisited (C++17)
- Revisiting void* (C++17)
- Ownership of Strings (C++17)
- fold expression (C++17)
- std::variant revisited (C++17)
- Concepts (C++ 20)
- constexpr if (C++17)
Work in progress (feel free to contribute)!
- Abstract Class
- Adapter Pattern
- Anonymous Namespace
- Argument-Dependent Lookup (ADL)
- Basic Guarantee
- Class
- Cohesion
- Const Cast
- Const Overloading
- Concrete Class
- Contravariance Problem
- Copy and Swap Idiom
- Copy Constructor
- Copy/Move Elision
- Coupling
- The Curiously Recurring Template Pattern (CRTP)
- Decorator Pattern
- Destructor
- Dependency Inversion Principle
- Dynamic Cast
- Exception Safety
- Factory Method Pattern
- Friend
- Forwarding Reference
- Initializer List
- Inline
- Interface Segregation Principle
- Iterator
- Liskov Substitution Principle
- Namespaces
- Non-Virtual Interface (NVI) Idiom
- Nothrow Guarantee
- Nullptr
- Observer Pattern
- Open/Closed Principle
- Reference
- Reinterpret Cast
- Resource Acquisition is Initialization (RAII)
- Round Bracket Initialization
- Run-Time Type Information (RTTI)
- Rvalue Reference
- Separate Compilation
- SFINAE (Substitution Failure Is Not An Error)
- Single Responsibility Principle
- SOLID Principles of OO Design
- Static Cast
- Strong Guarantee
- Superclass
- Unique Pointer
- Universal Reference
- UML
- Virtual
- Virtual Constructor Pattern
- Visitor Pattern
- Vtable
Brad Lushman
Online, M3 1006
bmlushma@uwaterloo.ca
https://www.student.cs.uwaterloo.ca/~cs246e
Must use Linux:
Windows:
putty.exe
- connect to linux.student.cs.uwaterloo.ca
- enable X11 forwarding
- win scp
Mac/Linux:
- terminal, ssh userid@linux.student.cs.uwaterloo.ca
Also Install xwindows server, eg. Xming, XQuartz
- Meet the CS 246 objectives, more breadth, more depth
- A course on abstraction
- Demand-driven, problem-oriented presentation, introduce C++ concepts as needed
- Linux tools on the side/tutorials
- C++17, C++20 features during discussion sessions
- Lots of template metaprogramming
- Separated problem 2 out from first problem.
- Added generalized versions of the Visitor Pattern with lots of template metaprogramming recursion magik in problem 26 and 33
- Added printing the unprintable in problem 28, inspired by a former student
- Added Policies in problem 34