期刊文献+

面向对象与泛型编程矛盾论(上)——类型擦除技术在C++中的应用

The Conflicts between OO and Generic Programming(Part 1)
下载PDF
导出
摘要 本文讨论了C++中泛型编程(generic programming)与面向对象设计(object-oriented design)原则的冲突问题,并用实例——any_iterator,一个类型安全、适用于任何类型的C++遍历器——说明了类型擦除(type erasure)技术对此问题的解决办法。 The author discusses how the generic programming paradigm in C++ can lead to conflicts with object-oriented design principles.To address this problem,the author depicts a technique called'type erasure'which could be used to alleviate these conflicts.An in-depth example is presented,in which it covers any iterator,a type-safe,heterogeneous C++ iterator.
出处 《程序员》 2008年第3期88-92,8,共5页 Programmer
  • 相关文献

参考文献9

  • 1Bjarne Stroustrup‘s definition of C++. http:/Iwww.research.att.com/~bs/glossary.html#GC++ .
  • 2.Download my any_iterator(with documentation and regression tests)[]..
  • 3http://www.boost.org/doc/html/function.html" .
  • 4Jaakko Jarvi,Mat Marcus,and Sean Parent.Article on the poly librar. http://homepages.fh-regensburg.de/~mpool/mpoo107/ proceedings/5.pdf .
  • 5.Adobe Public Library‘s any_iterator[]..
  • 6.boost iterator facade[]..
  • 7.An interview with Alexander Stepanov[]..
  • 8http://boost-consulting.com/mplbook/⑤boost:any .
  • 9http://www.boost.org/doc/html/any.html⑥boost:function .

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部