Update To C++17

A2UPG5gL1cGBcXfugLBZXUBfjAPd9OHz

本课程面向至少熟悉 C++11 和 C++14 到中级水平的程序员。

虽然 C++17 的发布没有最初计划的那么大,但它仍然有许多新特性和语言改进。它延续了“现代 C++”主题,即添加更好的抽象、为函数式编程提供更多支持并在编译时完成更多工作。库开发人员和编译时程序员会发现许多有用的特性,以及每个 C++ 应用程序开发人员都希望使用的结构化绑定等特性!

本课程从核心 C++ 语言的更改开始。其中包括结构化绑定,这使得使用复合对象变得更加容易,以及 if 语句中的初始化程序,这将使您能够更简洁地编写在函数调用的返回值上分支的代码。

然后,我们将介绍 C++ 标准库的更改,从用于在字符串和数字之间转换的新函数开始。这些比旧的替代方案效率更高,非常适合编写处理大型字符串(如 XML 或 JSON)的代码。string_view 类从不创建临时对象,它提供了一种方便的方式来引用此类字符串中的元素,以及一种更有效的方式将字符串文字传递给需要 std::string 的函数参数。“词汇类型”、std::variant、std::optional 和 std::any 为源自 C 的习语(分别为联合、空/非空指针和指向 void 的指针)提供了更安全的替代方案。我们还介绍了改进使用 std::map 和 std::multimap,以及一种更快的字符串搜索方式。

以下两节涉及 C++17 中全新的两个库:文件系统接口和库算法的并行版本。最后,我们介绍编译时编程,包括非常重要的“constexpr if”特性。现在您可以编写在编译时执行的程序,而不必成为模板元编程大师!

每个讲座都包含所涵盖功能的演示,并提供可下载的练习和解决方案。这些相当简单,可以测试您对刚刚学习的主题的理解。

成功完成本课程后,您将对 C++17 中的新功能以及如何使用它们有很好的了解。

Published 10/2022
MP4 | Video: h264, 1280×720 | Audio: AAC, 44.1 KHz
Language: English | Size: 3.25 GB | Duration: 6h 8m

Learn about the new features in C++17!

What you’ll learn

Extend and update your knowledge of C++
Know the new language features in C++17
Understand the new language features in C++17
Be able to use the new language features in C++17 idiomatically

Requirements

Familiarity with C++11 and C++14
Some knowledge of multithreading in C++11
A compiler which supports C++17

Description

This course is intended for programmers who are familiar with C++11 and C++14 to at least Intermediate level.

While C++17 turned out not to be as big a release as originally planned, it still has many new features and improvements to the language. It continues the “Modern C++” theme of adding better abstractions, providing more support for a functional style of programming and doing more work at compile time. There are many features which library developers and compile-time programmers will find useful, along with features like structured bindings which every C++ application developer will want to use!

The course begins with the changes to the core C++ language. These include structured bindings, which make working with compound objects much easier, and initializers in if statements, which will enable you to write code which branches on the return value from a function call much more concisely.

We then cover the changes to the C++ Standard Library, starting with new functions for converting between strings and numbers. These are much more efficient than the older alternatives and are ideal for writing code that processes large strings such as XML or JSON. The string_view class, which never creates temporary objects, provides a convenient way of referring to elements in such strings, as well as a more efficient way to pass string literals to function arguments which expect a std::string. The “vocabulary types”, std::variant, std::optional and std::any, provide safer alternatives to idioms which derive from C (unions, null/non-null pointers and pointer to void respectively.) We also cover improvements to working with std::map and std::multimap, and a faster way of searching strings.

The following two sections deal with two libraries which are completely new in C++17: the filesystem interface and parallel versions of library algorithms. Finally, we cover compile-time programming, including the very important “constexpr if” feature. Now you can write programs which execute at compile-time, without having to be a template metaprogramming guru!

Each lecture contains a demonstration of the features being covered and has downloadable exercises, with solutions. These are fairly simple and test your understanding of the topic you have just learnt.

After successfully completing this course, you will have a good knowledge of the new features in C++17 and how to use them.

资源下载此资源仅限VIP下载,请先
本站资源仅限VIP会员下载点击购买VIP会员

原创文章,作者:steven,如若转载,请注明出处:https://rr3d.cn/38186.html

赞 (0)
steven的头像steven
上一篇 2022年10月24日
下一篇 2022年10月25日

相关推荐

发表回复

登录后才能评论
分享本页
返回顶部