Advanced Metaprogramming in Classic C++ (Paperback)
暫譯: 經典 C++ 的進階元編程 (平裝本)

Davide Di Gennaro

  • 出版商: Apress
  • 出版日期: 2015-04-30
  • 售價: $3,790
  • 貴賓價: 9.5$3,601
  • 語言: 英文
  • 頁數: 572
  • 裝訂: Paperback
  • ISBN: 1484210115
  • ISBN-13: 9781484210116
  • 相關分類: C++ 程式語言
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

相關主題

商品描述

Advanced Metaprogramming in Classic C++: Third Edition, offers a detailed and somewhat intense look into template metaprogramming (TMP) using Classic C++ code examples. The two newer standards are not used in the code so that the examples can be rich, illustrate the point, and be run with confidence. The code can be readily adapted to include the elements of the Modern C++ standards. The gain for the reader is that TMP is presented in the book as a set of techniques that will enable a new style to your C++ coding while making it exceptionally clear and efficient.

The book deals with language aspects, design patterns, examples and applications (seen as case studies). Special emphasis is put on small reusable techniques that will improve the quality of daily work. This is a book to sit with and learn from. Users of it in prior editions point out that they come back to it over and over. This edition enhances the readability and clarity of the discussion.

The approach in the book is used to maximize compatibility and clearly illustrate the techniques, enabling the reader to comprehend difficult material without the burdens of compiler errors, and other unnecessary complexities and enabling a much more intense treatment of the subject. For those interested in Modern C++, all subsequent additions to the C++ language are fully compatible with the code in this book and users familiar with them can leverage the techniques introduced in C++XX to make the patterns in this book even more powerful. There is a chapter that discusses issues regarding the two newer standards and the basics needed to program for the newer standards are readily available online.

What makes the book exceptional is the level of understanding of the concepts involved imparted by the author. This is not just a rote overview of metaprogramming. You will truly understand difficult topics like static assertions, how to write metafunctions, overload resolution, lambda expressions, and many others. More than that, you will work through them with practical examples guided by the author's frank explanations. This book requires you to think and to learn and to understand the language so that you can program at a higher level.

What you’ll learn

  • What templates and the small object toolkit are, and how to use them
  • How to do overload resolution
  • How to do metaprogramming with interfaces, algorithms, functors and refactoring
  • How to work with code generators
  • What is opaque type principle and how to use it
  • How to work with debugging templates and more
  • A chapter devoted to issues surrounding C++0x and C++14

Who this book is for

This book is for experienced C++ programmers who want to learn more.

Table of Contents

Part I

1. Templates

2. Small Object Toolkit

Part II

3. Static Programming

4. Overload Resolution

5. Interfaces

6. Algorithms

7. Code Generators

8. Functors

9. Opaque Type Principle

Part III

10. Refactoring

11. Debugging Templates

12. C++0X

13. Appendix A: Exercises

14. Appendix B: Bibliography

商品描述(中文翻譯)

《進階 C++ 模板元編程:第三版》提供了一個詳細且相對深入的視角,探討使用經典 C++ 代碼範例的模板元編程 (TMP)。書中不使用兩個較新的標準,以便範例能夠豐富、清晰地說明要點,並且可以自信地執行。這些代碼可以輕鬆地調整以包含現代 C++ 標準的元素。對讀者來說,TMP 在書中被呈現為一組技術,這將為您的 C++ 編碼帶來新的風格,同時使其異常清晰且高效。

本書涉及語言方面、設計模式、範例和應用(視為案例研究)。特別強調小型可重用技術,這將改善日常工作的質量。這是一本可以靜下心來學習的書。先前版本的使用者指出,他們會一次又一次地回到這本書。這一版增強了討論的可讀性和清晰度。

本書的方式旨在最大化兼容性並清楚地說明技術,使讀者能夠在沒有編譯器錯誤和其他不必要的複雜性的負擔下理解困難的材料,並能夠對主題進行更深入的探討。對於對現代 C++ 感興趣的人來說,C++ 語言的所有後續增補與本書中的代碼完全兼容,熟悉它們的使用者可以利用 C++XX 中介紹的技術,使本書中的模式更具威力。本書中有一章專門討論有關 C++0x 和 C++14 的問題,並且有關於新標準編程所需的基本知識可以輕鬆在線獲得。

使本書卓越的原因在於作者對所涉及概念的理解程度。這不僅僅是對元編程的死記硬背概述。您將真正理解靜態斷言、如何編寫元函數、重載解析、lambda 表達式等困難主題。更重要的是,您將通過作者坦率的解釋,通過實際範例來深入理解這些主題。本書要求您思考、學習並理解語言,以便您能夠在更高的層次上進行編程。

您將學到的內容:
- 什麼是模板和小型物件工具包,以及如何使用它們
- 如何進行重載解析
- 如何使用介面、算法、函數物件和重構進行元編程
- 如何使用代碼生成器
- 什麼是不透明類型原則以及如何使用它
- 如何處理調試模板等
- 一章專門討論 C++0x 和 C++14 的相關問題

本書適合對象:
本書適合希望深入學習的經驗豐富的 C++ 程式設計師。

目錄:
第一部分
1. 模板
2. 小型物件工具包

第二部分
3. 靜態編程
4. 重載解析
5. 介面
6. 算法
7. 代碼生成器
8. 函數物件
9. 不透明類型原則

第三部分
10. 重構
11. 調試模板
12. C++0X
13. 附錄 A:練習
14. 附錄 B:參考文獻