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

            Ay's Blog@CNSSUESTC

            ATL的offsetofclass中,為啥_ATL_PACKING是8的解釋

            解答出處

            http://stackoverflow.com/questions/5014061/whats-the-use-of-atl-packing-constant-when-computing-distance-from-the-start-o

            ?

            C++標(biāo)準(zhǔn)規(guī)定:

            編譯器的類的類型轉(zhuǎn)換對空指針(NULL)特殊處理,即你NULL進(jìn)行強(qiáng)制類型轉(zhuǎn)化的結(jié)果還是NULL,所以….

            				static_cast類型轉(zhuǎn)化的時(shí)候,_ATL_PACKING的值得是非零就好
            		
            				
            				?

            C++ Standard 4.10/3 Pointer conversions [conv.ptr]:

            An rvalue of type “pointer to cv D,” where D is a class type, can be converted to an rvalue of type “pointer to cv B,” where B is a base class (clause 10) of D. If B is an inaccessible (clause 11) or ambiguous (10.2) base class of D, a program that necessitates this conversion is ill-formed. The result of the conversion is a pointer to the base class sub-object of the derived class object. The null pointer value is converted to the null pointer value of the destination type.

            posted on 2012-01-12 13:52 __ay 閱讀(1944) 評論(1)  編輯 收藏 引用 所屬分類: 算法 && C/C++

            Feedback

            # re: ATL的offsetofclass中,為啥_ATL_PACKING是8的解釋 2012-01-25 11:56 泡菜

            說實(shí)話沒看懂。。。。

            不過,C++/C的NULL之前都是宏實(shí)現(xiàn),每個(gè)編譯器的底層實(shí)現(xiàn)是不同的,所以進(jìn)行特殊處理是很正常的,在正式C++2011中就出臺了一個(gè)‘nullptr——空指針標(biāo)識’,來統(tǒng)一,減少各個(gè)編譯器的相互’兼容‘性
            這里有文章:

            http://imcc.blogbus.com/logs/107147212.html  回復(fù)  更多評論   


            日本久久中文字幕| 91精品国产91久久综合| 久久人人爽人人精品视频| 亚洲精品tv久久久久| 亚洲中文久久精品无码| 色偷偷888欧美精品久久久| 久久久久国产| 欧美亚洲色综久久精品国产| 国产精品美女久久久网AV| 亚洲国产成人精品91久久久| 色综合久久综合中文综合网| 91超碰碰碰碰久久久久久综合| 久久久久亚洲国产| 久久线看观看精品香蕉国产| 久久只有这里有精品4| 国产激情久久久久影院| 中文字幕久久精品无码| 久久av高潮av无码av喷吹| 开心久久婷婷综合中文字幕| 久久国产精品成人片免费| 久久精品三级视频| 久久国产乱子伦免费精品| 久久se精品一区二区影院| 国产亚洲色婷婷久久99精品| 伊人久久大香线蕉综合5g| 久久久久综合国产欧美一区二区| 久久99国内精品自在现线| 亚洲欧美日韩中文久久| 久久精品中文字幕一区| 日本久久久精品中文字幕| 2022年国产精品久久久久| 久久久久亚洲av无码专区喷水| 久久福利资源国产精品999| 国内精品久久久久久久久电影网| 国产亚洲精久久久久久无码| 中文字幕乱码人妻无码久久| 国色天香久久久久久久小说| 久久精品桃花综合| 欧美成人免费观看久久| 久久久久亚洲av成人网人人软件| 亚洲AⅤ优女AV综合久久久|