#pragma once #include /// Appends a specified vector with elements of another vector. template void insertAtEnd(std::vector & dest, const std::vector & src) { if (src.empty()) return; dest.reserve(dest.size() + src.size()); dest.insert(dest.end(), src.begin(), src.end()); } template void insertAtEnd(std::vector & dest, std::vector && src) { if (src.empty()) return; if (dest.empty()) { dest.swap(src); return; } dest.reserve(dest.size() + src.size()); dest.insert(dest.end(), std::make_move_iterator(src.begin()), std::make_move_iterator(src.end())); src.clear(); }