C++11 Language Features

This course will provide you with detailed information about all of the changes made to the language since C++98/03.
Course info
Rating
(233)
Level
Intermediate
Updated
Nov 13, 2013
Duration
3h 21m
Table of contents
C++11 Features in GCC 4.8
Templates, Classes, Initialization
Move Semantics, Perfect Forwarding, constexpr
Range-based for nullptr, enums, literals, static_assert, noexcept
More Language Features, other Platforms, and The Future of C++
Description
Course info
Rating
(233)
Level
Intermediate
Updated
Nov 13, 2013
Duration
3h 21m
Description

GCC 4.8 is the first version of the compiler to have complete support for all the C++ features added in the C++11 version of the standard. This course will provide you with detailed information about all of the changes made to the language since C++98/03 and their implementation in GCC.

About the author
About the author

Alex Korban is an author and consultant with an interest in functional programming, databases and geospatial applications. He co-founded a company to visualize geospatial data and wrote several books.

More from the author
Building Real World Applications with Elm
Intermediate
2h 18m
Feb 2, 2018
PostgreSQL: Time and Temporal Data
Intermediate
3h 37m
Aug 16, 2017
More courses by Alex Korban
Section Introduction Transcripts
Section Introduction Transcripts

Templates, Classes, Initialization
Hi. This is Alex Korban. Welcome to Module 2 of the GCC C++11 course. In this module I'm going to focus on the features related to templates and classes, as well as the new syntax for initialization, which attempts to unify all the different cases of initialization in C++. The two big additions to templates are variadic templates and template aliases. There are also a number of other smaller changes which can make your life easier if you write template code. For classes, C++11 makes a number of changes related to constructors and initialization. It adds keywords for additional control over inheritance and compiler generated functions, and it incorporates a few smaller changes such as access rights for nested classes.

Move Semantics, Perfect Forwarding, constexpr
Hi. This is Alex Korban. Welcome to Module 3 of the GCC C++11 course. I'll dedicate a large part of this module to explaining move semantics, which also requires talking about rvalue references and how they work. I will then talk about the forwarding problem and the solution to it, which involves rvalue references and variadic templates. Finally, I will show you the constexpr mechanism, which allows you to tell the compiler which variables and functions can be evaluated at compile time. I think this module is quite exciting because the main advantage of all these features is improved performance either thanks to eliminating unnecessary copying or due to pushing some computation from runtime to compile time.

Range-based for nullptr, enums, literals, static_assert, noexcept
Hi. This is Alex Korban. Welcome to Module 4 of the GCC C++11 course. There is no cohesive theme in this module, but nonetheless the features I'm going to talk about are quite useful. I'll start off with the new variant of the for loop, which allows you to iterate over containers conveniently. I'll talk about nullptr, which is an improved alternative to NULL. You'll learn about the new features of enums. I'll cover the Unicode support in the language and the new types of literals. You'll also find out about writing compile time assertions and the new mechanism for exception specifications, so let's dive in.

More Language Features, other Platforms, and The Future of C++
Hi. This is Alex Korban. Welcome to Module 5 of the GCC C++11 course. This is the last module of this course, but I still have quite a few interesting things to tell you about C++11. First, I'll talk about the remainder of the language features not covered in the previous modules. It's a substantial list. You'll learn about explicit conversion operators, inline namespaces, alignment keywords, and the new capability of sizeof. You'll also find out about the new memory model and the thread local storage specifier. I'll talk about generalized attributes, the updated definition of POD types, the changes made to unions, and the features added for compatibility with C99. That's it for language features. I'll also tell you which features have been deprecated or removed from the language. I'll give a quick summary of C++11 support in other compilers so you can understand what's available if you target multiple platforms. Finally, I'd like to give you a glimpse of the new language features planned for C++14. There's a lot to cover in this module, so let's get started.