C++ Lambda Story: Everything you need to know about Lambda Expressions in Modern C++! (Paperback)
暫譯: C++ Lambda 故事:現代 C++ 中你需要知道的所有 Lambda 表達式!(平裝本)
Filipek, Bartlomiej
- 出版商: Independently Published
- 出版日期: 2021-02-01
- 售價: $970
- 貴賓價: 9.8 折 $950
- 語言: 英文
- 頁數: 164
- 裝訂: Quality Paper - also called trade paper
- ISBN: 9798590126835
- ISBN-13: 9798590126835
-
相關分類:
C++ 程式語言
海外代購書籍(需單獨結帳)
商品描述
This book shows the story of lambda expressions in C++. You'll learn how to use this powerful feature in a step-by-step manner, slowly digesting the new capabilities and enhancements that come with each revision of the C++ Standard.
This is a Black and White version. The full-colour print is also available - look for "C++ Lambda Story (Full Color)".
We'll start with C++98/03, and then we'll move on to the latest C++ Standards.
- C++98/03 - how to code without lambda support. What was the motivation for the new modern C++ feature?
- C++11 - early days. You'll learn about all the elements of a lambda expression and even some tricks. This is the longest chapter as we need to cover a lot.
- C++14 - updates. Once lambdas were adopted, we saw some options to improve them.
- C++17 - more improvements, especially by handling this pointer and allowing constexpr.
- C++20 - in this section we'll have a look at the latest and very fresh C++20 Standard.
Additionally, throughout the chapters, you'll learn about the following techniques:
- Immediately Invoked Functional Expressions (IIFE)
- How to instrument a default functor to gather extra information
- Replacing std:: bind1st, std:: bind2nd and removed functional stuff
- The Overloaded Pattern and how to inherit from a lambda
- Passing C++ captureless lambda as a function pointer to C API
- LIFTING with lambdas
- Storing lambdas in a container
- Variadic templates and arguments packs
- Lambdas and asynchronous execution
- and many more
All equipped with more than 85 runnable code samples
商品描述(中文翻譯)
這本書展示了 C++ 中 lambda 表達式的故事。您將以逐步的方式學習如何使用這個強大的功能,慢慢消化每個 C++ 標準修訂所帶來的新能力和增強功能。
這是一本黑白版本。全彩印刷版也可供選擇 - 請尋找「C++ Lambda Story (全彩)」。
我們將從 C++98/03 開始,然後轉向最新的 C++ 標準。
- C++98/03 - 如何在沒有 lambda 支援的情況下編碼。新現代 C++ 功能的動機是什麼?
- C++11 - 早期階段。您將學習 lambda 表達式的所有元素,甚至一些技巧。這是最長的一章,因為我們需要涵蓋很多內容。
- C++14 - 更新。一旦 lambda 被採用,我們看到了一些改進的選項。
- C++17 - 更多改進,特別是處理 this 指標並允許 constexpr。
- C++20 - 在這一部分,我們將看看最新且非常新的 C++20 標準。
此外,在各章中,您將學習以下技術:
- 立即執行函數表達式 (IIFE)
- 如何儀器化一個默認函數對象以收集額外信息
- 替換 std::bind1st、std::bind2nd 和移除的函數功能
- 重載模式以及如何從 lambda 繼承
- 將 C++ 無捕獲 lambda 作為函數指針傳遞給 C API
- 使用 lambda 進行提升 (LIFTING)
- 將 lambda 存儲在容器中
- 可變參數模板和參數包
- lambda 和異步執行
- 以及更多
所有內容配備超過 85 個可執行的代碼範例。