C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (Paperback)
David Abrahams, Aleksey Gurtovoy
- 出版商: Addison Wesley
- 出版日期: 2004-12-10
- 售價: $2,160
- 貴賓價: 9.5 折 $2,052
- 語言: 英文
- 頁數: 408
- 裝訂: Paperback
- ISBN: 0321227255
- ISBN-13: 9780321227256
-
相關分類:
C++ 程式語言
立即出貨 (庫存 < 3)
買這商品的人也買了...
-
$1,890$1,796 -
$590$466 -
$560$504 -
$2,340$2,223 -
$480$379 -
$750$593 -
$780$616 -
$780$663 -
$1,986Code Complete: A Practical Handbook of Software Construction, 2/e (Paperback)
-
$490$382 -
$490$417 -
$650$553 -
$480$408 -
$650$507 -
$460$363 -
$520$406 -
$880$695 -
$880$581 -
$550$468 -
$720$569 -
$600$480 -
$540$427 -
$620$527 -
$580$493 -
$490$417
相關主題
商品描述
Table of Contents:
Preface.
Acknowledgments.
Making the Most of This Book.
1. Introduction.
Getting Started.
So What's a Metaprogram?
Metaprogramming in the Host Language.
Metaprogramming in C++.
Why Metaprogramming?
When Metaprogramming?
Why a Metaprogramming Library?
2. Traits and Type Manipulation.
Type Associations.
Metafunctions.
Numerical Metafunctions.
Making Choices at Compile Time.
A Brief Tour of the Boost Type Traits Library.
Nullary Metafunctions.
Metafunction Definition.
History.
Details.
Exercises.
3. A Deeper Look at Metafunctions.
Dimensional Analysis.
Higher-Order Metafunctions.
Handling Placeholders.
More Lambda Capabilities.
Lambda Details.
Details.
Exercises.
4. Integral Type Wrappers and Operations.
Boolean Wrappers and Operations.
Integer Wrappers and Operations.
Exercises.
5. Sequences and Iterators.
Concepts.
Sequences and Algorithms.
Iterators.
Iterator Concepts.
Sequence Concepts.
Sequence Equality.
Intrinsic Sequence Operations.
Sequence Classes.
Integral Sequence Wrappers.
Sequence Derivation.
Writing Your Own Sequence.
Details.
Exercises.
6. Algorithms.
Algorithms, Idioms, Reuse, and Abstraction.
Algorithms in the MPL.
Inserters.
Fundamental Sequence Algorithms.
Querying Algorithms.
Sequence Building Algorithms.
Writing Your Own Algorithms.
Details.
Exercises.
7. Views and Iterator Adaptors.
A Few Examples.
View Concept.
Iterator Adaptors.
Writing Your Own View.
History.
Exercises.
8. Diagnostics.
Debugging the Error Novel.
Using Tools for Diagnostic Analysis.
Intentional Diagnostic Generation.
History.
Details.
Exercises.
9. Crossing the Compile-Time/Runtime Boundary.
for each.
Implementation Selection.
Object Generators.
Structure Selection.
Class Composition.
(Member) Function Pointers as Template Arguments.
Type Erasure.
The Curiously Recurring Template Pattern.
Explicitly Managing the Overload Set.
The "sizeof Trick".
Summary.
Exercises.
10. Domain-Specific Embedded Languages.
A Little Language.
Goes a Long Way.
DSLs, Inside Out.
C++ as the Host Language.
Blitz++ and Expression Templates.
General-Purpose DSELs.
The Boost Spirit Library.
Summary.
Exercises.
11. A DSEL DesignWalkthrough.
Finite State Machines.
Framework Design Goals.
Framework Interface Basics.
Choosing a DSL.
Implementation.
Analysis.
Language Directions.
Exercises.
Appendix A. An Introduction to Preprocessor Metaprogramming.
Motivation.
Fundamental Abstractions of the Preprocessor.
Preprocessor Library Structure.
Preprocessor Library Abstractions.
Exercise.
Appendix B. The typename and template Keywords.
The Issue.
The Rules.
Appendix C. Compile-Time Performance.
The Computational Model.
Managing Compilation Time.
The Tests.
Appendix D. MPL Portability Summary.
Bibliography.
Index.
商品描述(中文翻譯)
目錄:
前言。
致謝。
充分利用本書。
1. 簡介。
- 入門。
- 什麼是元程式設計?
- 主機語言中的元程式設計。
- C++中的元程式設計。
- 為什麼要使用元程式設計?
- 何時使用元程式設計?
- 為什麼需要一個元程式設計庫?
2. 特性和類型操作。
- 類型關聯。
- 元函數。
- 數值元函數。
- 編譯時做出選擇。
- Boost類型特性庫簡介。
- 無參數元函數。
- 元函數定義。
- 歷史。
- 詳細內容。
- 練習題。
3. 深入研究元函數。
- 尺寸分析。
- 高階元函數。
- 處理Pl