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

            導航

            統計

            公告

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

            常用鏈接

            留言簿(4)

            隨筆檔案

            文章分類

            文章檔案

            搜索

            最新評論

            閱讀排行榜

            評論排行榜

            狠狠色狠狠色综合久久| 99久久精品无码一区二区毛片| 一日本道伊人久久综合影| 久久久久亚洲?V成人无码| 尹人香蕉久久99天天拍| 久久夜色精品国产欧美乱| 久久99国产一区二区三区| 亚洲愉拍99热成人精品热久久| 日本福利片国产午夜久久| 色播久久人人爽人人爽人人片AV| 久久精品国产久精国产| 久久久久久精品成人免费图片| 香蕉久久夜色精品国产小说| 国内精品伊人久久久影院| 99久久国产综合精品网成人影院 | 伊人色综合九久久天天蜜桃| 久久久久久久久无码精品亚洲日韩 | 久久人人爽人人爽人人片AV高清 | 伊人久久一区二区三区无码| 亚洲国产天堂久久综合网站| 精品国产乱码久久久久软件| 国产精品久久久99| 久久精品国产亚洲AV无码娇色| 免费一级欧美大片久久网| 色欲久久久天天天综合网| 99久久免费国产精品特黄| 久久精品国产WWW456C0M| 国产精品99久久精品| 久久久久亚洲AV无码永不| 久久国产免费直播| 久久婷婷色综合一区二区 | 久久天天躁狠狠躁夜夜网站| 久久99精品国产麻豆宅宅| 久久午夜无码鲁丝片秋霞 | 久久精品aⅴ无码中文字字幕重口 久久精品a亚洲国产v高清不卡 | 精品久久久久久久中文字幕| av国内精品久久久久影院| 国产成人精品久久一区二区三区 | 欧美一区二区精品久久| 国产精品久久波多野结衣| 国产精品久久久久久久久鸭|