《c++ templates the complete guide》序言

   译者序:

    c++真可谓包罗万象,博大精深。每个在c++中沉迷多年的爱好者都难免有这样的感慨:使用c++多年过后,我们往往只能算是一个熟练的使用者,却从来不敢给自己冠上“精通c++”的头衔,难道“精通c++”永远都是不惭的大言?然而,在学习,使用,和研究c++的过程中,我们总是期望能够像“精通”不断迈进,并领悟c++语言的精髓。我想,要做到这一点起码要注意3个方面:一要把握语言发展的脉搏,二要多应用标准技术,三要洞悉标准技术背后的实现细节。做到这些往往能事半功倍。

 近年来,c++的新发展主要是在GP方面大放异彩:标准库,boost库,容器,迭代器,仿函数等都是围绕着GP不断呈现出来的,他们都代表了现在C++程序设计的特性。而在这种种技术的背后,隐含着一种根深蒂固的共性:模板技术,处处都是模板代码。可以说:Gp设计本身就是基于模板的程序设计,也正是模板的这种编译器机制,进一步展现了GP的优越,体现了C++高效率的特点,更有助于GP达到与oo并驾齐驱的地位。

 

 

作者序:

   The idea of templates in C++ is more than ten years old. C++ templates were already documented in 1990 in the
"Annotated C++ Reference Manual" or so-called "ARM" (see [EllisStroustrupARM]) and they had been described
before that in more specialized publications. However, well over a decade later we found a dearth of literature that
concentrates on the fundamental concepts and advanced techniques of this fascinating, complex, and powerful C++
feature. We wanted to address this issue and decided to write the book about templates (with perhaps a slight lack of  humility).

  However, we approached the task with different backgrounds and with different intentions. David, an experienced
compiler implementer and member of the C++ Standard Committee Core Language Working Group, was interested
in an exact and detailed description of all the power (and problems) of templates. Nico, an "ordinary" application
programmer and member of the C++ Standard Committee Library Working Group, was interested in understanding
all the techniques of templates in a way that he could use and benefit from them. In addition, we both wanted to share this knowledge with you, the reader, and the whole community to help to avoid further misunderstanding, confusion, or apprehension.

    As a consequence, you will see both conceptual introductions with day-to-day examples and detailed descriptions of  the exact behavior of templates. Starting from the basic principles of templates and working up to the "art of template programming," you will discover (or rediscover) techniques such as static polymorphism, policy classes,
metaprogramming, and expression templates. You will also gain a deeper understanding of the C++ standard library, in which almost all code involves templates.

  We learned a lot and we had much fun while writing this book. We hope you will have the same experience while
reading it. Enjoy!

原文链接: https://www.cnblogs.com/youxin/archive/2012/07/15/2592214.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

    《c++ templates the complete guide》序言

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/55276

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月9日 上午6:22
下一篇 2023年2月9日 上午6:23

相关推荐