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

            導航

            統計

            公告

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

            常用鏈接

            留言簿(4)

            隨筆檔案

            文章分類

            文章檔案

            搜索

            最新評論

            閱讀排行榜

            評論排行榜

            久久伊人精品一区二区三区| 精品无码久久久久国产动漫3d| 国产综合久久久久| 99久久99久久精品国产片| 伊人丁香狠狠色综合久久| 久久亚洲2019中文字幕| 精品熟女少妇AV免费久久| 曰曰摸天天摸人人看久久久| 精品国产乱码久久久久久呢 | 亚洲色婷婷综合久久| av无码久久久久久不卡网站| 久久国产精品免费一区二区三区| 一本一道久久a久久精品综合 | 午夜人妻久久久久久久久| 久久亚洲国产中v天仙www| 亚洲中文久久精品无码| 久久亚洲精品无码观看不卡| 久久久久国产精品| 久久综合久久自在自线精品自| 色诱久久av| 久久高清一级毛片| 久久亚洲欧美日本精品| 无码久久精品国产亚洲Av影片 | 久久久中文字幕| 久久大香香蕉国产| 日韩人妻无码精品久久久不卡| 中文字幕精品久久| 亚洲欧美成人久久综合中文网| 国产午夜电影久久| 7国产欧美日韩综合天堂中文久久久久| 久久午夜夜伦鲁鲁片免费无码影视| 久久久久国产亚洲AV麻豆| 国产精品日韩欧美久久综合| 国産精品久久久久久久| 88久久精品无码一区二区毛片| 美女写真久久影院| 国产99久久久国产精免费| 久久精品亚洲男人的天堂| 无码人妻少妇久久中文字幕| 2021最新久久久视精品爱| 亚洲综合日韩久久成人AV|