• <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)生(實(shí)例化)的類). 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: 實(shí)例化. 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 閱讀(114) 評論(0)  編輯 收藏 引用


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


            導(dǎo)航

            統(tǒng)計

            公告

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

            常用鏈接

            留言簿(4)

            隨筆檔案

            文章分類

            文章檔案

            搜索

            最新評論

            閱讀排行榜

            評論排行榜

            欧美va久久久噜噜噜久久| 久久亚洲国产欧洲精品一| 亚洲精品无码久久毛片| 99精品久久久久中文字幕| 久久99精品久久久久久动态图| 久久一日本道色综合久久| 91精品国产高清久久久久久io| 久久精品国产亚洲精品| 亚洲精品无码成人片久久| 亚洲乱亚洲乱淫久久| 欧美日韩精品久久免费| www久久久天天com| 伊人久久大香线蕉综合5g| 欧美日韩中文字幕久久伊人| 久久99热这里只有精品国产| 久久久久97国产精华液好用吗| 久久99精品久久久久久久久久| 亚洲精品午夜国产va久久 | 国产精品99久久不卡| 久久AV高潮AV无码AV| 青青热久久国产久精品 | 日产精品久久久久久久| 久久综合给合综合久久| 国产高潮久久免费观看| 久久久免费精品re6| 久久久久久久久久久精品尤物 | 人人狠狠综合久久88成人| 伊人久久一区二区三区无码| 精品久久久久久国产免费了| a级毛片无码兔费真人久久| 久久精品九九亚洲精品| 久久青青草视频| 欧美激情精品久久久久久| 久久久久国色AV免费看图片| 久久99热这里只有精品国产| 激情久久久久久久久久| 婷婷综合久久狠狠色99h| 品成人欧美大片久久国产欧美... 品成人欧美大片久久国产欧美 | 精品久久久无码中文字幕天天| 久久99国产精品一区二区| 99精品久久久久中文字幕|