Item 25: Consider support for a non-throwing swap(Effective C++)
摘要:
Provide a swap member function when std::swap would be inefficient for your type. Make sure your swap doesn't throw exceptions. If you offer a member swap, also offer a non-member swap that calls the member. For classes (not templates), specialize std::swap, too. When calling swap, employ a usin 阅读全文
posted @ 2011-03-28 20:41 Ray Z 阅读(204) 评论(0) 推荐(0) 编辑