C++ Templates

C++ Templates
分享
扫描下方二维码分享到微信
打开微信,点击右上角”+“,
使用”扫一扫“即可将网页分享到朋友圈。
2004-04
版次: 1
ISBN: 9787508319247
定价: 49.80
装帧: 平装
开本: 其他
纸张: 胶版纸
页数: 528页
18人买过
  • 本书是一本对基本概念和语言特性有着深刻见解的指南性书籍,同时也是一本包含内容广泛的参考性书籍。本书首先讲述了语言细节,然后对编码技巧进行了广泛的讨论,最后还对模板的高级应用进行了阐述、分析。贯串全书的示例阐明了抽象概念并演示了最优实践方法。
      
      读者将学习到:
      
      ·正确的模板行为;
      
      ·如何避开与模板相关的错误陷阱;
      
      ·从基础的到早前没有文字约定的惯用语法和技巧;
      
      ·如何在不对性能和安全性造成损害的前提下进行源代码重用;
      
      ·如何提高C++程序的效率;
      
      ·如何构建更具灵活性和可维护性的软件。 David Vandevoorde是20多年的C++工作经验,C++标准委员会成员。曾因为审校《The C++ Programming Language》一书的草稿,获得Bjarne Stroustrup的推荐,编写了《C++ Solutions》。 Preface

    Acknowledgments

     1 About This Book

      1.1 What You Should Know Before Reading This Book

      1.2 Overall Structure of the Book

      1.3 How to Read This Book

      1.4 Some Remarks About Programming Style

      1.5 The Standard versus Reality

      1.6 Example Code and Additional Informations

      1.7 Feedback

    Part I:The Basics

     2 Function Templates

      2.1 A First Look at Function Templates

       2.1.1 Defining the Template

       2.1.2 Using the Template

      2.2 Argument Deduction

      2.3 Template Parameters

      2.4 Overloading Function Templates

      2.5 Summary

     3 Class Templates

      3.1 Implementation of Class Template Stack

       3.1.1 Declaration of Class templates

       3.1.2 Implementation of Member Functions

      3.2 Use of Class Template Stack

      3.3 Specializations of Class Templates

      3.4 Partial Specialization

      3.5 Default Template Arguments

      3.6 Summary

     4 Nontype Template Parameters

      4.1 Nontype Class Template Parameters

      4.2 Nontype Function Template Parameters

      4.3 Restrictions for Nontype Template Parameters

      4.4 Summary

     5 Tricky Basics

      5.1 Keyword typename

      5.2 Using this->

      5.3 Member Templates

      5.4 Template Template Parameters

      5.5 Zero Initialization

      5.6 Using String Literals as Arguments for Function Templates

      5.7 Summary

     6 Using Templates in Practice

      6.1 The Inclusion Model

       6.1.1 Linker Errors

       6.1.2 Templates in Header Files

      6.2 Explicit Instantiation

       6.2.1 Example of Explicit Instantiation

       6.2.2 Combining the Inclusion Model and Explicit Instantiation

      6.3 The Separation Model

       6.3.1 The Keyword export

       6.3.2 Limitations of the Separation Model

       6.3.3 Preparing for the Separation Model

      6.4 Templates and inline

      6.5 Precompiled Headers

      6.6 Debugging Templates

       6.6.1 Decoding the Error Novel

       6.6.2 Shallow Instantiation

       6.6.3 Long Symbols

       6.6.4 Tracers

       6.6.5 Oracles

       6.6.6 Archetypes

      6.7 Afternotes

      6.8 Summary

     7 Basic Template Terminology

      7.1 “Class Template”or“Template Class”?

      7.2 Instantiation and Specialization

      7.3 Declarations versus Definitions

      7.4 The One-Definition Rule

      7.5 Template Arguments versus Template Parameters

    Part II:Templates in Depth

     8 Fundamentals in Depth 

      8.1 Parameterized Declarations

       8.1.1 Virtual Member Functions

       8.1.2 Linkage of Templates

       8.1.3 Primary Templates

      8.2 Template Parameters

       8.2.1 Type Parameters

       8.2.2 Nontype Parameters

       8.2.3 Template Template Parameters

       8.2.4 Default Template Arguments

      8.3 Template Arguments

       8.3.1 Function Template Arguments

       8.3.2 Type Arguments

       8.3.3 Nontype Arguments

       8.3.4 Template Template Arguments

       8.3.5 Equivalence

      8.4 Friends

       8.4.1 Friend Functions

       8.4.2 Friend Templates

      8.5 Afternotes

     9 Names in Templates

     10 Instantiation

     11 Template Argument Deduction

     12 Specialization and Overloading

     13 Future Directions

    Part III:Templates and Design

     14 The Polymorphic Power of Templates

     15 Traits and Policy Classes

     16 Templates and Inheritance

     17 Metaprograms

     18 Expression Templates

     19 Type Classification

     20 Smart Pointers

     21 Tuples

     22 Function Objects and Callbacks

    Appendixes

     A The One-Definition Rule

     B Overload Resoution

    Bibliography

    Glossary

    Index
  • 内容简介:
    本书是一本对基本概念和语言特性有着深刻见解的指南性书籍,同时也是一本包含内容广泛的参考性书籍。本书首先讲述了语言细节,然后对编码技巧进行了广泛的讨论,最后还对模板的高级应用进行了阐述、分析。贯串全书的示例阐明了抽象概念并演示了最优实践方法。
      
      读者将学习到:
      
      ·正确的模板行为;
      
      ·如何避开与模板相关的错误陷阱;
      
      ·从基础的到早前没有文字约定的惯用语法和技巧;
      
      ·如何在不对性能和安全性造成损害的前提下进行源代码重用;
      
      ·如何提高C++程序的效率;
      
      ·如何构建更具灵活性和可维护性的软件。
  • 作者简介:
    David Vandevoorde是20多年的C++工作经验,C++标准委员会成员。曾因为审校《The C++ Programming Language》一书的草稿,获得Bjarne Stroustrup的推荐,编写了《C++ Solutions》。
  • 目录:
    Preface

    Acknowledgments

     1 About This Book

      1.1 What You Should Know Before Reading This Book

      1.2 Overall Structure of the Book

      1.3 How to Read This Book

      1.4 Some Remarks About Programming Style

      1.5 The Standard versus Reality

      1.6 Example Code and Additional Informations

      1.7 Feedback

    Part I:The Basics

     2 Function Templates

      2.1 A First Look at Function Templates

       2.1.1 Defining the Template

       2.1.2 Using the Template

      2.2 Argument Deduction

      2.3 Template Parameters

      2.4 Overloading Function Templates

      2.5 Summary

     3 Class Templates

      3.1 Implementation of Class Template Stack

       3.1.1 Declaration of Class templates

       3.1.2 Implementation of Member Functions

      3.2 Use of Class Template Stack

      3.3 Specializations of Class Templates

      3.4 Partial Specialization

      3.5 Default Template Arguments

      3.6 Summary

     4 Nontype Template Parameters

      4.1 Nontype Class Template Parameters

      4.2 Nontype Function Template Parameters

      4.3 Restrictions for Nontype Template Parameters

      4.4 Summary

     5 Tricky Basics

      5.1 Keyword typename

      5.2 Using this->

      5.3 Member Templates

      5.4 Template Template Parameters

      5.5 Zero Initialization

      5.6 Using String Literals as Arguments for Function Templates

      5.7 Summary

     6 Using Templates in Practice

      6.1 The Inclusion Model

       6.1.1 Linker Errors

       6.1.2 Templates in Header Files

      6.2 Explicit Instantiation

       6.2.1 Example of Explicit Instantiation

       6.2.2 Combining the Inclusion Model and Explicit Instantiation

      6.3 The Separation Model

       6.3.1 The Keyword export

       6.3.2 Limitations of the Separation Model

       6.3.3 Preparing for the Separation Model

      6.4 Templates and inline

      6.5 Precompiled Headers

      6.6 Debugging Templates

       6.6.1 Decoding the Error Novel

       6.6.2 Shallow Instantiation

       6.6.3 Long Symbols

       6.6.4 Tracers

       6.6.5 Oracles

       6.6.6 Archetypes

      6.7 Afternotes

      6.8 Summary

     7 Basic Template Terminology

      7.1 “Class Template”or“Template Class”?

      7.2 Instantiation and Specialization

      7.3 Declarations versus Definitions

      7.4 The One-Definition Rule

      7.5 Template Arguments versus Template Parameters

    Part II:Templates in Depth

     8 Fundamentals in Depth 

      8.1 Parameterized Declarations

       8.1.1 Virtual Member Functions

       8.1.2 Linkage of Templates

       8.1.3 Primary Templates

      8.2 Template Parameters

       8.2.1 Type Parameters

       8.2.2 Nontype Parameters

       8.2.3 Template Template Parameters

       8.2.4 Default Template Arguments

      8.3 Template Arguments

       8.3.1 Function Template Arguments

       8.3.2 Type Arguments

       8.3.3 Nontype Arguments

       8.3.4 Template Template Arguments

       8.3.5 Equivalence

      8.4 Friends

       8.4.1 Friend Functions

       8.4.2 Friend Templates

      8.5 Afternotes

     9 Names in Templates

     10 Instantiation

     11 Template Argument Deduction

     12 Specialization and Overloading

     13 Future Directions

    Part III:Templates and Design

     14 The Polymorphic Power of Templates

     15 Traits and Policy Classes

     16 Templates and Inheritance

     17 Metaprograms

     18 Expression Templates

     19 Type Classification

     20 Smart Pointers

     21 Tuples

     22 Function Objects and Callbacks

    Appendixes

     A The One-Definition Rule

     B Overload Resoution

    Bibliography

    Glossary

    Index
查看详情
12
相关图书 / 更多
C++ Templates
C++边做边学
冯玉芬;周树功;母景琴;詹胜
C++ Templates
C++程序设计基础教程 第2版
刘厚泉 李政伟 葛欣
C++ Templates
C++编程这样学
胡芳
C++ Templates
C++程序设计案例教程(线上线下混合版)
杨卫明;李晓虹
C++ Templates
C++之旅(第3版)
[美]Bjarne Stroustrup(本贾尼 斯特劳斯特鲁普
C++ Templates
C++20代码整洁之道:可持续软件开发模式实践(原书第2版)
[德]斯蒂芬·罗斯(Stephan Roth)
C++ Templates
C++ Core Guidelines解析
杨文波 译;[德]赖纳·格林(Rainer Grimm)著 吴咏炜;何荣华;张云潮
C++ Templates
C++程序设计(第4版)
周会平;徐建军;王挺
C++ Templates
C++开发案例精讲
杨国兴 著
C++ Templates
C++程序设计实践教程(新国标微课版)
马光志
C++ Templates
C++程序设计基础与实践
牛园园;韩洁琼;李晓芳;吴成宇
C++ Templates
C++程序设计基础教程
丁卫平 程学云 陈文兰 主编;任红建 沈晓红 文万志 副主编
您可能感兴趣 / 更多
C++ Templates
R统计与数据可视化:社会科学数据分析实践(全彩)
David S. Brown(戴维·S.布朗
C++ Templates
脑卒中干细胞移植治疗
David C. Hess
C++ Templates
几何基础(英文版)
David Hilbert;Autho
C++ Templates
DK机械运转的秘密 修订版
David Macaulay(大卫·麦考利
C++ Templates
大众生态学
David Burnie 著;古滨河 译
C++ Templates
社会正义与城市
David Harvey
C++ Templates
社会理论的邀请
David Inglis
C++ Templates
用于未来汽车的铅酸电池
David A.J.Rand 编;[德]Jürgen Garche、Eckhard Karden、Patrick T.Moseley、吴旭、何艺 译
C++ Templates
全球大气环流导论
David Randall
C++ Templates
语素导论(语言学及应用语言学名著译丛)
David Embick
C++ Templates
BRADDOM康复医学临床手册
David X. Cifu 主编;敖丽娟 陈文华 周谋望 译者;Henry L. Lew
C++ Templates
C++ Templates中文版
David Vandevoorde;Nicolai M.Josuttis