长路漫漫

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年8月8日

摘要: 1、模板函数中,类型参数必须精确匹配,不支持自动(隐式)类型转换。When we call a function template such as max() for some arguments, the template parameters are determined by the arguments we pass. If we pass two ints to the parameter type T const &, the C++ compiler must conclude that T must be int. Note that no automatic type 阅读全文
posted @ 2012-08-08 15:10 opangle 阅读(919) 评论(0) 推荐(1)