• <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)

            隨筆檔案

            文章分類

            文章檔案

            搜索

            最新評論

            閱讀排行榜

            評論排行榜

            亚洲精品无码久久久久去q| 秋霞久久国产精品电影院| 亚洲国产成人久久笫一页| 亚洲欧洲久久av| 国产成人久久激情91| 久久久久久国产精品美女| 久久香综合精品久久伊人| 色综合久久久久无码专区| 久久久久久A亚洲欧洲AV冫| 亚洲AV无码久久精品蜜桃| 久久精品成人影院| 色婷婷综合久久久久中文| 国产999精品久久久久久| 久久妇女高潮几次MBA| 久久婷婷人人澡人人| 精品亚洲综合久久中文字幕| 一本久久综合亚洲鲁鲁五月天| 久久99国产精品久久久| 久久国语露脸国产精品电影| 国产精品99久久久久久猫咪| 久久人人爽人人爽人人片av高请 | 久久成人永久免费播放| 欧美一区二区三区久久综合| 久久亚洲av无码精品浪潮| 狠狠色丁香久久综合五月| 亚洲国产精品无码久久| 亚洲精品美女久久久久99小说| 国产精品免费久久久久久久久| 无遮挡粉嫩小泬久久久久久久| 婷婷久久综合九色综合九七| 久久精品国产亚洲综合色| 丁香狠狠色婷婷久久综合| 久久成人国产精品| 精品久久久噜噜噜久久久| 日韩精品久久无码人妻中文字幕 | 国产免费久久精品丫丫| 国产精品99久久精品| 91精品国产乱码久久久久久| AV无码久久久久不卡网站下载 | 中文字幕亚洲综合久久| 久久ZYZ资源站无码中文动漫 |