青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

C++ library系列 -- STL實現中的ODR “one-definition-rule” for types

Linking issue
- While different modules (.obj) using istreambuf_iterator/ostreambuf_iterator, compiled with different options on HID/no-HID and SCL/no-SCL, these modules could not be linked successfully;

The error comes directly from the CLR when a type has multiple definitions that are not consistent based upon the ODR, one-definition-rule for types. And, the linker itself isn't involved.

For example, with one module compile with /D_SECURE_SCL=0, while another is compiled with _SECURE_SCL=1;

At first, it's found that with _SECURE_SCL, the only thing that could be different as following,

#if _SECURE_SCL
    typedef _Range_checked_iterator_tag _Checked_iterator_category;
#endif

But, actually, it's not the typedef that changed the layout the these iterators (istreambuf_iterator/ostreambuf_iterator), and further they don't really use the extra pointer that _SECURE_SCL adds.

Finally, it's found the root cause is that, these iterators, istreambuf_iterator/ostreambuf_iterator  had been moved from <xutility> to <streambuf>, and their ultimate base class had been changed from _Iterator_base_secure to _Iterator_base. And, the layout of _Iterator_base would be different between HID and no-HID, and between SCL and no-SCL. It is the cause where the issue comes from.

What we can learn from such issue,
These iterators really shouldn't derive from either _Iterator_base_secure or _Iterator_base, because these classes contain data members (pointers) which are entirely unused. It would result in unnecessary bloat and extra work being performed in ctor/dtor etc.

Introduce a new class, _Iterator_base_universal, which is defined identically regardless of HID/no-HID and SCL/no-SCL. It would contains the three internal typedefs that all standard iterators need to have, and nothing else. And _Iterator_base (in all of its variants) and _Iterator_base_secure now should derive from _Iterator_base_universal to get these typedefs.

Now, when an iterator wants these typedefs, but not the data members of _Iterator_base and _Iterator_base_secure, it could derive from _Iterator_base_universal. And istreambuf_iterator and ostreambuf_iterator are now as small as possible, and keep identical representations or layout across HID/no-HID, SCL/no-SCL.

posted on 2010-12-19 11:09 flagman 閱讀(1909) 評論(0)  編輯 收藏 引用 所屬分類: C++

<2010年12月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

導航

統計

常用鏈接

留言簿(1)

隨筆分類

隨筆檔案

搜索

最新評論

閱讀排行榜

評論排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            国产一区二区三区在线观看视频| 欧美国产精品人人做人人爱| 国产欧美一区二区三区在线老狼| 午夜欧美精品久久久久久久| 亚洲欧美激情一区二区| 国语精品一区| 亚洲国产清纯| 国产精品白丝黑袜喷水久久久| 亚洲午夜免费福利视频| 亚洲小说春色综合另类电影| 国产人成一区二区三区影院| 久色成人在线| 欧美日韩一区免费| 久久久久久精| 欧美精品免费视频| 欧美在线亚洲综合一区| 久久一本综合频道| 亚洲影音一区| 久久亚洲精品视频| 亚洲天堂av在线免费| 香蕉久久精品日日躁夜夜躁| 亚洲精品在线视频| 亚洲女优在线| 日韩一级精品视频在线观看| 香蕉免费一区二区三区在线观看| 亚洲国产欧美一区二区三区丁香婷| 亚洲乱码久久| 一区二区在线看| 一本色道久久88综合亚洲精品ⅰ | 亚洲网站视频| 在线播放中文一区| 亚洲一区影院| 一区二区三区欧美成人| 久久久亚洲成人| 午夜精品一区二区三区在线| 欧美www视频在线观看| 久久精品91久久久久久再现| 欧美三级视频| 亚洲人成绝费网站色www| 黄色成人精品网站| 午夜精品999| 亚洲综合日韩| 欧美日韩精品免费观看视频完整| 久久影院午夜论| 国产精品一区二区黑丝| 99伊人成综合| 一本高清dvd不卡在线观看| 麻豆亚洲精品| 免费亚洲一区二区| 黄网站色欧美视频| 欧美在线观看视频在线| 欧美影院一区| 国产精品亚洲精品| 一区二区高清在线观看| 一区二区三区日韩欧美| 欧美精品激情在线| 91久久久一线二线三线品牌| 亚洲黄色有码视频| 欧美a级理论片| 欧美激情亚洲一区| 亚洲清纯自拍| 欧美精品在线观看91| 亚洲人成人77777线观看| 亚洲精品永久免费| 欧美乱人伦中文字幕在线| 亚洲第一综合天堂另类专| 亚洲高清视频中文字幕| 欧美成人有码| 日韩视频一区二区三区| 亚洲新中文字幕| 国产精品萝li| 欧美尤物巨大精品爽| 久久先锋影音| 亚洲精品视频二区| 欧美日韩久久精品| 亚洲午夜av电影| 久久精品夜色噜噜亚洲a∨| 国产一区二区在线观看免费| 久久婷婷久久一区二区三区| 欧美激情一区二区三区在线视频观看| 亚洲精品一区在线观看香蕉| 欧美视频在线观看视频极品| 午夜久久黄色| 亚洲动漫精品| 亚洲欧美精品suv| 狠狠干狠狠久久| 欧美精品激情在线| 亚洲欧美日韩直播| 欧美黄色网络| 香蕉亚洲视频| 亚洲国产日韩一级| 欧美亚州一区二区三区 | 亚洲欧洲av一区二区| 久久久久久91香蕉国产| 亚洲免费观看在线观看| 国产精品嫩草影院一区二区| 久久漫画官网| 亚洲婷婷综合久久一本伊一区| 久久伊伊香蕉| 亚洲一区二区三区精品动漫| 精品成人在线视频| 国产精品久久久久久久午夜| 久久久一区二区三区| 国产精品99久久久久久人| 你懂的网址国产 欧美| 亚洲在线一区二区| 亚洲人成在线免费观看| 国产性色一区二区| 国产精品电影网站| 麻豆国产精品777777在线| 午夜精品视频一区| 亚洲美女诱惑| 亚洲第一网站| 久久综合中文字幕| 欧美在线视频在线播放完整版免费观看| 亚洲欧洲日本在线| 韩国精品一区二区三区| 国产精品福利在线观看网址| 欧美福利在线| 欧美成人高清视频| 久久精品视频在线看| 亚洲男女自偷自拍| 亚洲视频狠狠| 一个色综合av| 日韩午夜激情av| 亚洲激情成人网| 欧美大片在线观看一区| 久久影院午夜论| 久久久久久免费| 久久久国产精品一区| 欧美在线播放一区| 羞羞色国产精品| 亚洲欧美清纯在线制服| 亚洲与欧洲av电影| 亚洲亚洲精品三区日韩精品在线视频 | 日韩一区二区电影网| 亚洲欧洲午夜| 亚洲乱码国产乱码精品精天堂| 亚洲欧洲一区二区在线播放 | 亚洲视频精品| 在线亚洲欧美| 亚洲综合另类| 先锋影音国产精品| 欧美一区中文字幕| 久久久精品tv| 美国成人毛片| 亚洲第一偷拍| 99精品热视频| 亚洲欧美一级二级三级| 欧美亚洲网站| 久久天堂国产精品| 欧美成人免费观看| 欧美日韩妖精视频| 国产精品美女久久久久久久| 国产日韩欧美二区| 在线观看精品一区| 日韩视频免费| 亚洲欧美日韩综合| 久久国产综合精品| 欧美jjzz| 一区二区三区黄色| 久久精品国产久精国产爱| 美女国产一区| 国产精品高潮久久| 精品不卡在线| 一区二区三区久久久| 久久国产精品一区二区| 亚洲电影一级黄| 亚洲色图制服丝袜| 久久综合导航| 国产精品成人在线| 一区在线播放| 亚洲社区在线观看| 久久亚洲综合网| 日韩一级黄色大片| 久久婷婷综合激情| 国产精品毛片高清在线完整版| 黑人巨大精品欧美一区二区| 夜夜爽www精品| 久久夜精品va视频免费观看| 99www免费人成精品| 久久久亚洲午夜电影| 欧美网站在线观看| 亚洲国产女人aaa毛片在线| 亚洲欧美日韩精品久久亚洲区| 免费成人高清在线视频| 亚洲一区二区三区四区在线观看| 久久尤物电影视频在线观看| 国产精品免费一区二区三区观看| 最新日韩欧美| 久久综合给合| 亚洲欧美成aⅴ人在线观看| 欧美国产成人在线| 在线观看日韩欧美| 久久激情视频免费观看| 亚洲午夜伦理| 欧美日韩在线播放| 日韩特黄影片| 欧美高清在线精品一区| 久久精品水蜜桃av综合天堂|