// 配列のコピー
template <class T>
void copy_vector(std::vector<T>& dst, const std::vector<T>& src)
{
if( !dst.empty() ) return;// エラー
// 領域を確保
dst.reserve( src.size() );
// コピー
std::copy( src.begin(), src.end(), std::back_inserter(dst) );
}
最終更新:2012年04月25日 10:49