Practical C++14 and C++17 Features
C++14 and C++17 added many new features to the C++ language. This course will teach you practical features introduced in C++14 and C++17, that you will be able to use to write clearer, simpler, and higher-quality modern C++ code.
What you'll learn
After the C++11 "revolution," several other features were added by the C++14 and C++17 standards. While C++11 was a massive improvement over the previous C++98/03, C++14 and C++17 are kind of more incremental improvements; nonetheless, interesting, powerful and useful features were added in these recent C++ standards. In this course, Practical C++14 and C++17 Features, you'll learn many practical features added in the C++14 and C++17 standards, assuming you have only a basic knowledge of C++11, like the one you can get watching the "C++11 from Scratch" course; any advanced C++11 concepts will be explained here on a need-to-know basis. Among the many topics discussed in this course, you'll start learning small but nice features, like digit separators. Then you'll explore more substantial features, like polymorphic lambdas (the course will also introduce basic lambdas as well, so you're not left in the dark if you don't know C++11 lambdas), and relaxed constexpr functions. You'll also learn about improvements to the C++ standard library, like the new standard-defined suffixes for the Chrono library (which will be introduced as well), or std::make_unique in combination with the unique_ptr smart pointer (that'll be introduced here as well). Finally, you'll explore new practical C++17 features, ranging from nested namespaces, to "constexpr if" and structured bindings. The features will be discussed using both slides, and with concrete C++ demo code, including showing some subtle bugs, and how to fix them. After completing this course, you'll be able to write simpler, clearer, more efficient and higher-quality modern C++ code, applying the features discussed in this course in your own C++ codebases. This course targets developers who are already familiar with basic C++11, and want to extend their knowledge to practical C++ features introduced in C++14 and in C++17. If you need a beginner-oriented introduction to C++11, you can watch the "C++11 from Scratch" course.
Table of contents
- Introduction 2m
- What Is a Raw Pointer? 3m
- Requesting Memory: Stack vs. Heap 7m
- Smart Pointers, unique_ptr, and make_unique 7m
- Demo: Raw Pointers vs. unique_ptr Smart Pointer and make_unique 8m
- Standard-defined Literals and the Chrono Library 9m
- Demo: Standard-defined Chrono Literals 8m
- Tuples and Fetching Elements by Type 4m
- Summary 1m
- Introduction 1m
- Writing Less Code with Nested Namespaces 3m
- Variable Declarations in if and switch Statements 6m
- Demo: Variable Declarations in if Statements 4m
- Compile-time Evaluations with if constexpr 5m
- Demo: if constexpr in Action 6m
- Writing Clearer Code with Structured Bindings 6m
- Demo: Structured Bindings in Action 3m
- Summary and Thank You 3m