2010-11-10から1日間の記事一覧
今までの swap 今までの swap の実装は次のような感じでしょうか template<typename T> inline void swap( T& lhs, T& rhs ){ T temp = lhs; lhs = rhs; rhs = temp; } コピーが3回呼ばれます cfoo::cfoo( const cfoo& ) cfoo::operator=( const cfoo& ) cfoo::operator</typename>…