• 《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!

  • 相关阅读:
    P1227 【[JSOI2008]完美的对称】
    Hive使用Calcite CBO优化流程及SQL优化实战
    深入浅出Calcite与SQL CBO(Cost-Based Optimizer)优化
    神奇的传送门
    怎么设计一个秒杀系统
    我的收藏
    Redis 客户端 Jedis、lettuce 和 Redisson 对比
    Redis 的完整安装过程
    Redis GEO 功能使用场景
    Redis 传送门
  • 原文地址:https://www.cnblogs.com/youxin/p/2592214.html
Copyright © 2020-2023  润新知