Introduction to modern C++ (slides) and code samples from Lectures
Notes: compile with c++11 / c++14 / c++17 / c++20 switch enabled. E.g. g++ -std=c++20. If needed, add -lpthread to link against thread library.
Review material for basic C++ prerequisites (fundamental programming course level, up to classes)
http://www.icce.rug.nl/documents/cplusplus/ (good and didactic reference)
L/R-values, move semantics and r-value references, perfect forwarding, auto, range-based loops, nullptr, scoped enums :
Meyers-cpp11NotesSample.pdf slide set: slides [1-7] + [18-34]
http://www.codeproject.com/Articles/397492/Move-Semantics-and-Perfect-Forwarding-in-Cplusplus (perfect-forwarding)
STL
- containers (vector, set, map, multi-set, multi-map, string)
- algorithms and numeric algorithms
- lambdas
- optional
PHAST library
- PHAST web site (register to download documentation)
- presentation (NOTE: phast::transform has changed ... now a for_each needs to be used in its place)
Miscellaneous material:
C++ Reference (Entry + intermediate): cplusplus.com
C++ Reference (intermediate to advanced): cppreference.com
Tables with compilers, and versions, that support each modern (11,14,17,2a) C++ feature
Some suggested exercises:
- perform timing of different variations of the Big-number class usage, adopting moves where appropriate vs using copies
- implement two versions of a sample code that manages a scoresheet, e.g. for a sportive event (managing a player_name/team_name and the score). One version using a std::map< > and one using a std::vector< std::pair< >>, reimplementing the basic "map" funcionalities: insert and lookup. Compare timing.