Used new pass-by-value idiom in constructors taking std::vector.