• <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>
            隨筆 - 64, 文章 - 11, 評(píng)論 - 12, 引用 - 0
            數(shù)據(jù)加載中……

            c++0x 系列

            result_of 用于推導(dǎo)可調(diào)用對(duì)象的返回類型。
            大致定義:
            template<class Ty>
                struct result_of {
                typedef T0 type;
                };
            Ty: 可調(diào)用類型,

            The template class defines its member type as a synonym for the return type of a function call described by its template argument Ty. The template argument must be of the form Fty(T1, T2, ..., TN), where Fty is a callable type. The template determines the return type according to the first of the following rules that applies:

            • if Fty is a pointer to function type R(*)(U1, U2, ..., UN) the return type is R;

            • 如果Fty是個(gè)R(*)(U1, U2, ..., UN) 函數(shù)指針,那么返回類型是R

            • if Fty is a reference to function type R(&)(U1, U2, ..., UN) the return type is R;

            • 如果Fty是個(gè)R(&)(U1, U2, ..., UN) 函數(shù)指針,那么返回類型是R

            • if Fty is a pointer to member function type R(U1::*)(U2, ..., UN) the return type is R;

            • 如果Fty是個(gè)R(U1::*)(U2, ..., UN)成員函數(shù)指針,那么返回類型是R

            • if Fty is a pointer to data member type R U1::* the return type is R;

            • 如果Fty是個(gè)R U1::* 成員變量指針,那么返回類型是R

            • if Fty is a class with a member typedef result_type the return type is Fty::result_type;

            • 如果Fty是一個(gè)類并且其中定義了result_type ,那么返回類型是Fty::result_type

            • if N is 0 (that is, Ty is of the form Fty()) the return type is void;

            • 如果Fty函數(shù)不帶有任何的參數(shù),那么返回類型是void

            • if Fty is a class with a member template named result the return type is Fty::result<T1, T2, ..., TN>::type;

            • 如果Fty是個(gè)類并且有個(gè)成員模板是result,那么返回類型是Fty::result<T1, T2, ..., TN>::type

            • in all other cases it is an error.

            • 其它情況就會(huì)出錯(cuò)

            posted on 2011-07-29 10:24 Robertxiao 閱讀(159) 評(píng)論(0)  編輯 收藏 引用 所屬分類: C++ Tech


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


            成人a毛片久久免费播放| 久久久久国产精品| 久久无码国产专区精品| 久久综合给久久狠狠97色| 99精品国产在热久久无毒不卡 | 亚洲国产成人久久一区久久| 精品伊人久久大线蕉色首页| 久久99国产乱子伦精品免费| 性欧美大战久久久久久久| 国产精品久久久久久吹潮| 色婷婷久久综合中文久久一本| 久久久久久亚洲Av无码精品专口| 久久伊人中文无码| 久久最新精品国产| 久久亚洲精品国产精品| 思思久久好好热精品国产| 93精91精品国产综合久久香蕉| 亚洲中文字幕无码久久综合网 | 国产精品久久久久影院嫩草| 亚洲国产精品无码久久久久久曰| 嫩草影院久久99| 久久91亚洲人成电影网站| 欧美黑人激情性久久| 国产激情久久久久久熟女老人| 久久中文字幕无码专区| 久久久精品久久久久久 | 熟妇人妻久久中文字幕| 一本久久a久久精品综合香蕉| 久久97久久97精品免视看| 欧美一区二区精品久久| 色综合久久综精品| 久久夜色精品国产噜噜麻豆| 久久久久久久波多野结衣高潮 | 韩国免费A级毛片久久| 亚洲AV日韩精品久久久久久| 久久精品中文无码资源站| 久久天天躁狠狠躁夜夜不卡| 久久久久亚洲国产| 综合网日日天干夜夜久久| 久久夜色精品国产欧美乱| 久久er热视频在这里精品|