深圳夜归人

繁华的都市,有谁记得我们的脚步?

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

2005年9月3日

摘要: c++0x keynote中包含一个重要的typeof表达式,用以“自动获取一个类型”,当然是编译期。一、基本用法。1、typeof表达式。以下是它列出的用法:a、取表达式的值的类型:template<class A, class B>function operator*(A a, B b) -> typeof(a*b); // return type last// big ch... 阅读全文
posted @ 2005-09-03 20:15 cpunion 阅读(4545) 评论(0) 推荐(0) 编辑