• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            健康,快樂,勇敢的寧帥!!

            努力、努力、再努力! 沒有什么能阻止我對知識的渴望。

             

            "C++Templates The Complete Guide"讀書筆記----Chapter 7

            Basic Template Terminology
            1. "Class Template" or "Template Class"?
            class template: the class is a template.
            template class: a synonym(同義詞) for class template; to refer to classes generated from templates(由模板產(chǎn)生(實例化)的類). to refer to classes with a name that is a template-id.
            Because of this imprecision, template class is avoided in this book.

            2. Instantiation and specialzation
            Instantiation: 實例化. The process of creating a regular class, function, or member function from a template by substituting actual values for its arguments is called template instantiation.
            Specialzation:特例,在Chapter 3中有描述

            3. Declarations vs Definitions
            declaration is a C++ construct that introduces or reintroduceds a name into? a C++ scope.
            class?C;?//?a?declaration?of?C?as?a?class
            void?f(int?p);?//?a?declaration?of?f()?as?a?function?and?p?as?a?named?parameter
            extern?int?v;?//?a?declaration?of?v?as?a?variable

            Declarations become definitions when the details of their structure are made known or, in the case of variables, when storage space must be allocated.
            class?C{};?//?definition(and?declaration)?of?class?C
            void?f(int?p){?//?defini
            ???std::cout<<?p?<<?std::endl;
            }


            extern?int?v?=?1;??//?an?initializer?makes?this?a?definition?for?v

            int?w;???//?global?variable?declaration?not?preceded?by?extern?are?also?definitions
            By extension, the declaration of?a class template or function template is called a definition if it has a body, Hence,
            template?<typename?T>
            void?func(T);
            is a declaration that is not a definition, whereas
            template?<typename?T>
            class?S{};
            is in fact a definition

            posted on 2006-12-03 15:02 ningfangli 閱讀(113) 評論(0)  編輯 收藏 引用


            只有注冊用戶登錄后才能發(fā)表評論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            導(dǎo)航

            統(tǒng)計

            公告

            Dict.CN 在線詞典, 英語學(xué)習(xí), 在線翻譯

            常用鏈接

            留言簿(4)

            隨筆檔案

            文章分類

            文章檔案

            搜索

            最新評論

            閱讀排行榜

            評論排行榜

            中文字幕热久久久久久久| 99久久精品无码一区二区毛片| 免费一级欧美大片久久网| 久久无码国产| 久久夜色精品国产噜噜麻豆| 蜜桃麻豆www久久| 日韩一区二区三区视频久久| 人妻精品久久久久中文字幕69 | 少妇久久久久久久久久| 精品久久777| 久久成人国产精品免费软件| 精品久久久久久| 人妻精品久久无码专区精东影业| 亚洲国产成人久久精品动漫| 国产一区二区久久久| 99久久精品国产毛片| 久久综合狠狠综合久久| 亚洲欧美国产日韩综合久久| 91久久香蕉国产熟女线看| 久久永久免费人妻精品下载| 一级女性全黄久久生活片免费| 久久国产免费观看精品| 日韩人妻无码一区二区三区久久| 一本色道久久88综合日韩精品| 狠狠综合久久综合中文88| 久久综合久久综合久久综合| 亚洲国产另类久久久精品黑人| 伊人久久无码精品中文字幕| 精品一久久香蕉国产线看播放| 91精品国产综合久久婷婷| 无码人妻精品一区二区三区久久久 | 久久综合色之久久综合| 国产成人精品久久亚洲| 国产精品久久久久aaaa| 成人综合伊人五月婷久久| 久久久精品国产sm调教网站 | 人妻久久久一区二区三区| 乱亲女H秽乱长久久久| 久久婷婷五月综合色奶水99啪| 人妻精品久久无码区| 成人妇女免费播放久久久|