Instructor-led training
Modern C++ Programming using C++11/C++14 Training in West Allis, Wisconsin
The intent of this class is to provide students with a solid intro.
What you'll learn
Private Training for Teams
This course is offered as private, instructor-led training for organizations, onsite in West Allis, Wisconsin or live online. Dates, delivery format, and course content are arranged around your team's requirements.
This course is not currently scheduled as a public class for individual enrollment.
Request Group TrainingPrerequisites
Course Outline
Where modern C++ gets difficult
The new keywords are easy to type. The hard part is the rules behind them, which fail quietly when you misread them.
- Move semantics. A named rvalue reference is itself an lvalue, and std::move only casts. Whether a move actually happens depends on the overloads and special members a type has. The result is often a silent copy, or a moved-from object used too early.
- {} versus (). Brace initialization prevents narrowing, but a constructor taking an initializer list wins overload resolution whenever it can. std::vector<int>(5, 1) and std::vector<int>{5, 1} build different objects.
- Type deduction. The syllabus has a block on it: template arguments, auto, decltype, decltype(auto) and deduced return types. The rules differ slightly in each context. auto drops references and top-level const, while decltype(auto) preserves them. A deduced return type can therefore return a copy where you expected a reference, or the reverse.
- Lambdas. Generic lambdas are templates in disguise. Extended capture lets you move an object into a closure, but a closure that captures by reference can outlive what it refers to.
- Templates and meta-programming. Variadic templates, specialization and non-type template arguments lead to compile-time computation, type information and expression templates. Errors appear at instantiation, far from the mistake, and are long.
The topics depend on each other. Deduction rules underlie templates, lambdas and the STL's generic code. Move semantics determines how containers behave. Meta-programming uses all of them at once, so gaps in the earlier material show up there.
Who this course suits and what to take around it
The stated prerequisite is basic C++ knowledge plus practical experience. The course suits developers who already write classes, use pointers and containers, and want to adopt the C++11 and C++14 features listed in the syllabus. It also suits teams who maintain code written in an older style and need to read, review or gradually modernize it.
If your C++ is rusty or your experience is mostly C, a fuller foundation first makes the two days more productive. C++ Programming covers the language in depth over five days.
For the next step, the syllabus here includes a section on the Standard Template Library (iterators, containers, functions). C++ Standard Template Library goes into that area at greater length. For design patterns and more advanced template work, Advanced C++ for Experts - Design Patterns, STL, C++11/C++14 is the natural progression.
Organizations that standardize on a particular compiler or language level can ask for private training tailored to the versions they use. See Request a training proposal.
Illustrative scenarios
The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.
- Modernizing a container-heavy module. A team might have code full of hand-written iterator loops and copy-heavy return values. Range-based for-loops, rvalues and move semantics, and initializer lists let them simplify the loops and avoid needless copies, with the STL iterator concept as the common vocabulary.
- Replacing function objects with lambdas. For example, a codebase may use many small functors passed to algorithms. The syllabus covers functors, lambdas, generic lambdas and extended capture, which together let a team decide where a lambda reads better and where a named functor is still the right tool.
- Reducing template boilerplate in a shared library. A library group might maintain several near-identical overloads. Function and class templates, variadic templates and specialization can collapse them. Type deduction rules then determine whether the resulting interfaces return the types callers expect.
AI coding assistants and these topics
AI coding assistants can help in a few ways here. They can explain a long template error message, suggest where auto or a lambda would simplify a loop, and draft unit tests around a refactored function. They are useful for translating old-style loops and functors into range-based loops and lambdas as a first pass.
They are weaker where C++ is subtle, and several syllabus topics sit in exactly those places:
- Move semantics: generated code may call std::move on an object that is used again, or return a local by std::move in a way that blocks optimization.
- Deduction: an assistant may choose auto where decltype(auto) or an explicit type is needed, or the other way around, changing whether a reference or a copy is returned.
- Lambdas: default reference capture can leave dangling references when a closure outlives its scope.
- Template code: specializations and variadic expansions can compile for the examples shown and fail for other types.
To verify, compile with warnings enabled and treated as errors, and run the sanitizers (ASan, UBSan) on a test suite that exercises moved-from objects and edge-case types. Use static_assert to pin down deduced types and compile-time results, and review ownership and lifetime by hand. Treat assistant output as a draft you must be able to explain line by line.
Frequently asked questions
What level is this course?
It is a general-level, two-day course for developers who already work in C++. It focuses on the C++11 and C++14 features named in the syllabus rather than on the basics of the language.
What do I need to know beforehand?
Basic C++ knowledge and practical experience are required. You should be comfortable with classes, pointers and references, and the basics of templates and containers.
What does the course cover?
The syllabus covers range-based for-loops, rvalues and move semantics, initializer lists, and the {} versus () distinction. It also covers function and class templates, variadic templates, specialization, non-type template arguments, functors, type deduction (auto, decltype, decltype(auto), deduced return types), lambdas (including generic lambdas and extended capture), the STL, and an introduction to meta-programming.
Can this be delivered privately for our team, onsite or online?
Yes. HSG delivers private training for organizations either onsite at the client's location or live online.
Can the content be customized?
Private training can be customized, including being tailored to the compiler and language versions your organization uses. You can describe your needs through the training proposal request.
Training locations
Modern C++ Programming using C++11/C++14 training across the U.S. and beyond.
We provide private Modern C++ Programming using C++11/C++14 training for organizations, onsite at your location or live online, throughout the United States and internationally.
View all Modern C++ Programming using C++11/C++14 training locations
Train your team with HSG
Private, instructor-led training customized for your organization.
- Onsite or live online delivery
- Customized curriculum
- For a single employee or an entire team
- Flexible scheduling
- Experienced instructors
Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com
Ready to train your team?
Let's customize this training for your organization.
Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.