• <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   管理


            国产精品美女久久久久网| 久久中文字幕视频、最近更新| 久久精品国产亚洲αv忘忧草 | 久久精品国产一区| 热久久这里只有精品| 久久夜色撩人精品国产| 亚洲精品乱码久久久久久自慰| 久久九九有精品国产23百花影院| 久久久久女教师免费一区| 久久综合狠狠综合久久综合88| 久久精品国产亚洲AV香蕉| segui久久国产精品| 精品多毛少妇人妻AV免费久久| av无码久久久久久不卡网站| 青青久久精品国产免费看| 国内精品久久久久久久97牛牛| 久久久久久亚洲精品无码| 久久不射电影网| 久久久精品2019免费观看| 亚洲国产日韩欧美久久| 色综合久久中文综合网| 久久久久亚洲av无码专区导航 | 国产成人无码久久久精品一| 亚洲国产成人久久一区WWW| 国内精品久久久久| 久久99久久99精品免视看动漫 | 精品久久久久久久久久中文字幕| 久久精品亚洲一区二区三区浴池| 久久综合一区二区无码| 久久久精品久久久久特色影视| a级成人毛片久久| jizzjizz国产精品久久| 精品乱码久久久久久久| 精品国产乱码久久久久久1区2区| 久久人人添人人爽添人人片牛牛| 四虎久久影院| 久久久久久免费视频| 久久久无码精品亚洲日韩蜜臀浪潮| 久久天天躁夜夜躁狠狠| 久久无码AV中文出轨人妻| 久久丫忘忧草产品|