conversion between vectors with different allocator types
This commit is contained in:
parent
c277fbde53
commit
de8d456f73
1 changed files with 12 additions and 0 deletions
|
@ -69,6 +69,18 @@ namespace MultiArrayTools
|
|||
template <typename T>
|
||||
using vector = std::vector<T,MultiArrayHelper::Allocator<T>>;
|
||||
|
||||
template <typename T>
|
||||
inline std::vector<T> toStdVec(const vector<T>& v)
|
||||
{
|
||||
return std::vector<T>(v.begin(), v.end());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline vector<T> toMatVec(const std::vector<T>& v)
|
||||
{
|
||||
return vector<T>(v.begin(), v.end());
|
||||
}
|
||||
|
||||
} // namespace MultiArrayTools
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue