• <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 閱讀(110) 評論(0)  編輯 收藏 引用


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


            導(dǎo)航

            統(tǒng)計

            公告

            Dict.CN 在線詞典, 英語學習, 在線翻譯

            常用鏈接

            留言簿(4)

            隨筆檔案

            文章分類

            文章檔案

            搜索

            最新評論

            閱讀排行榜

            評論排行榜

            久久久女人与动物群交毛片| 国产一久久香蕉国产线看观看| 品成人欧美大片久久国产欧美...| 国产亚洲欧美成人久久片| 久久精品9988| 亚洲欧美久久久久9999| 奇米影视7777久久精品| 97久久精品人人澡人人爽| 亚洲日本va午夜中文字幕久久 | 久久综合九色综合久99 | 88久久精品无码一区二区毛片 | 久久国产精品99久久久久久老狼| 久久99亚洲综合精品首页| 精品久久久无码人妻中文字幕| 久久99国产精品久久久| 亚洲国产香蕉人人爽成AV片久久| 俺来也俺去啦久久综合网| 天天综合久久一二三区| 国产精品久久久久久搜索| 综合久久给合久久狠狠狠97色| 9191精品国产免费久久| 色欲av伊人久久大香线蕉影院| 久久天天躁狠狠躁夜夜不卡 | 色欲综合久久躁天天躁蜜桃| 久久久久女教师免费一区| 亚洲精品美女久久777777| 一本色道久久综合| 久久久久香蕉视频| 国产成人香蕉久久久久| 久久久九九有精品国产| 国产精品国色综合久久| 综合网日日天干夜夜久久 | 99久久国产综合精品麻豆| 久久久久青草线蕉综合超碰| 久久成人精品| 久久国产精品免费一区| 色综合久久综合网观看| 91精品国产91久久| 91精品国产91久久久久久青草| 久久久久国产一级毛片高清版| 久久国产精品99精品国产|