“Exploring the C++ Standard Library” is a two-day training course with programming exercises taught by Christopher Di Bella. It is offered at the Sheraton Bellevue Hotel from 9AM to 5PM on Saturday and Sunday, September 30th and October 1st (immediately after the conference). Lunch is included.
Make Simple Tasks Simple! and Back to the Basics! Essentials of Modern C++ Design were two powerfully-delivered keynotes at CppCon 2014. Both Stroustrup and Sutter ask us to write clean, simple code that expresses our intentions. A year later, they asked us to start using the CppCoreGuidelines, and more recently, Bjarne unveiled the future of C++. But what does all of this mean?
How can I take my Super Complex Algorithm™ and make it a Simple Task™? you may wonder. Some engineers prefer to hand-write code that works so they can move on to more interesting problems: sometimes it is indeed faster to write the algorithm that you’re thinking about instead of stopping and thinking about your true intentions for an algorithm. Never mind the QA that needs to happen, or the hidden corner case that you now own because you missed it during testing.
If only there was a library that could reduce the amount of time that you spend programming and testing. Behold, the C++ Standard Library! We’ll explore the Standard library, and explore how to turn genuine code samples from Super Complex Algorithm™ into Simple Task™. The Standard Library is extremely an well-supported library that is very well-tested across the major compilers, and is therefore less likely to have bugs than handwritten data structures and algorithms. You’ll also be able to give your algorithms descriptive names to help reduce those pesky comments that supposedly go out of date. We won’t just be exploring the STL, but the broader library that encompasses even some of the more recent features of C++ (C++17 features subject to compiler availability).
We’ll also explore the Concepts TS and the newly minted Ranges TS, and how it can make our code more expressive, safer, and change horrible template errors from PhD theses, to short and meaningful error messages.
- Minimum experience: 3+ months expereince in C++, including familiarity with templates
- Target audience: Beginners, intermediate, advanced
- Operating system: Windows, Linux, OS X
- Tools for Windows users: Bash for Windows (preferred) or MinGW
- Tools for all:
- a GitHub account
- a web browser
- Compiler: TBA August
- Microsoft’s GSL implementation
- a recent version of Boost
- vector, string, map
- Standard algorithms survey
- Performance testing with chrono
- GSL contracts
- a very light introduction to the Concepts TS and the Ranges TS
- I/O, text processing, regex
- Containers, standard views, GSL spans
- Writing a container-like structure
- Container refinement: smart pointers
- Container refinement: exception handling
- Dynamic memory allocation
- placement new
- manual dynamic memory allocation vs vector
We will look at practical aspects for most topics: this will sometimes include a case study.
Thread support and atomic operations are not included in this class. Please attend Anthony Williams’ class if you would like to learn about C++ concurrency in action.
Christopher Di Bella is a full time software developer at a financial company in Sydney, a casual tutor for a C++ course at UNSW Australia, and an avid C++ programmer.