0%

Book Description

Templates are among the most powerful features of C++, but they are too often neglected, misunderstood, and misused. C++ Templates: The Complete Guide provides software architects and engineers with a clear understanding of why, when, and how to use templates to build and maintain cleaner, faster, and smarter software more efficiently.

C++ Templates begins with an insightful tutorial on basic concepts and language features. The remainder of the book serves as a comprehensive reference, focusing first on language details, then on a wide range of coding techniques, and finally on advanced applications for templates. Examples used throughout the book illustrate abstract concepts and demonstrate best practices.

Readers learn

  • The exact behaviors of templates

  • How to avoid the pitfalls associated with templates

  • Idioms and techniques, from the basic to the previously undocumented

  • How to reuse source code without threatening performance or safety

  • How to increase the efficiency of C++ programs

  • How to produce more flexible and maintainable software

  • This practical guide shows programmers how to exploit the full power of the template features in C++.

    The companion Web site at http://www.josuttis.com/tmplbook/ contains sample code and additional updates.



    0201734842B09172002

    Table of Contents

    1. Title Page
    2. Copyright Page
    3. Contents
    4. Preface
    5. Acknowledgments
    6. Chapter 1. About This Book
    7. Part I. The Basics
      1. Chapter 2. Function Templates
      2. Chapter 3. Class Templates
      3. Chapter 4. Nontype Template Parameters
      4. Chapter 5. Tricky Basics
      5. Chapter 6. Using Templates in Practice
      6. Chapter 7. Basic Template Terminology
    8. Part II. Templates in Depth
      1. Chapter 8. Fundamentals in Depth
      2. Chapter 9. Names in Templates
      3. Chapter 10. Instantiation
      4. Chapter 11. Template Argument Deduction
      5. Chapter 12. Specialization and Overloading
      6. Chapter 13. Future Directions
    9. Part III. Templates and Design
      1. Chapter 14. The Polymorphic Power of Templates
      2. Chapter 15. Traits and Policy Classes
      3. Chapter 16. Templates and Inheritance
      4. Chapter 17. Metaprograms
      5. Chapter 18. Expression Templates
    10. Part IV. Advanced Applications
      1. Chapter 19. Type Classification
      2. Chapter 20. Smart Pointers
      3. Chapter 21. Tuples
      4. Chapter 22. Function Objects and Callbacks
    11. Appendix A. The One-Definition Rule
    12. Appendix B. Overload Resolution
    13. Bibliography
    14. Glossary
    15. Index
    16. Footnotes
      1. Chapter 1
      2. Chapter 2
      3. Chapter 3
      4. Chapter 5
      5. Chapter 6
      6. Chapter 7
      7. Chapter 8
      8. Chapter 9
      9. Chapter 10
      10. Chapter 11
      11. Chapter 12
      12. Chapter 14
      13. Chapter 17
      14. Chapter 16
      15. Chapter 17
      16. Chapter 18
      17. Chapter 19
      18. Chapter 20
      19. Chapter 21
      20. Chapter 22
      21. Appendix A
      22. Appendix B
    18.221.85.33