Effective C++笔记 1 Consider support for a non-throwing swap std::swap默认实现 piml手法 1.1 std::swap全特化 widget不是class而是lass templates 企图偏特化一个function template(std::swap),但C++只允许对class template偏特化, 在function templates身上偏特化是行不通的 1.2 non-member swap 1.3 using std::swap 重写swap 成员版swap绝不可能抛出异常 2 总结