We will write or analyse such code
constexpr int factorial11(int n) { // C++11 compatible
{
return (n == 0) ? 1 : n * factorial11(n-1);
}
constexpr int factorial14(int n) { // C++14
if (n == 0) {
return 1;
} else {
return n * factorial14(n-1);
}
}
using Coordinate = std::pair;
Coordinate origin() {
return Coordinate{0, 0};
}
const auto [ x, y ] = origin();
std::cout << "x: " << x << ", y: " << y;
Your abilities after Modern C++ advanced features training
- you know and use advanced features of modern C++
- you know limitations of presented features
- you apply the best practices for presented features
Agenda
- attributes
-
constexpr
-
noexcept
-
data structure alignment (
alignas
,alignof
) - structured bindings
- lambda expressions in short
- other useful features - review only
Activities
- pre-work to be done before our training
- pre-test pre-test at the beginning
- exercises followed by trainers implementation
- coding dojo
- participants solutions code review
- post-work with code review
- post-test one week after the training
- certificate of completion
Duration
- 1 day (7 hours with breaks)
Form
- online
- classroom
Order Modern C++ advanced features training
Related trainings
Modern C++ basic features
Covers other modern C++ features:
static_assert
, nullptr
, enum class
, auto
keyword, automatic type deduction, using
alias, uniform initialization, new keywords, range-based for
loops. Lambda expressions
The key feature of C++11, enhanced in C++14, C++17 and C++20 covered in detail in a separate session.