MyraMath
concatenate.h
Go to the documentation of this file.
1 // ========================================================================= //
2 // This file is part of MyraMath, copyright (c) 2014-2019 by Ryan A Chilton //
3 // and distributed by MyraCore, LLC. See LICENSE.txt for license terms. //
4 // ========================================================================= //
5 
6 #ifndef MYRAMATH_UTILITY_CONCATENATE_H
7 #define MYRAMATH_UTILITY_CONCATENATE_H
8 
14 #include <vector>
15 
16 namespace myra {
17 
19 template<class T> std::vector<T> concatenate(const std::vector<T>& v1, const std::vector<T>& v2)
20  {
21  std::vector<T> v12(v1);
22  v12.insert(v12.end(), v2.begin(), v2.end());
23  return v12;
24  }
25 
26 } // namespace myra
27 
28 #endif
Definition: syntax.dox:1
std::vector< T > concatenate(const std::vector< T > &v1, const std::vector< T > &v2)
Returns [v1 v2].
Definition: concatenate.h:19