jeans chen
we've got them by the balls

classes和templates都支持接口和多态,interfaces and polymorphism

对classes而言接口是显示的explicit,以函数签名为中心。多态则是通过virtual函数发生于运行期

对templates参数而言,接口是隐式的implicit,奠基于有效表达式。多态则是通过templates具现化和函数重载解析function overloading resolution发生于编译期

 

posted on 2013-07-09 14:02  jeans chen  阅读(225)  评论(0编辑  收藏  举报