From de8d456f73c8b11a615eadb52bcdc045b8b6800b Mon Sep 17 00:00:00 2001 From: Christian Zimmermann Date: Sun, 17 Mar 2019 23:56:35 +0100 Subject: [PATCH] conversion between vectors with different allocator types --- src/include/allocator.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/include/allocator.h b/src/include/allocator.h index aaff744..6eb8a82 100644 --- a/src/include/allocator.h +++ b/src/include/allocator.h @@ -68,6 +68,18 @@ namespace MultiArrayTools { template using vector = std::vector>; + + template + inline std::vector toStdVec(const vector& v) + { + return std::vector(v.begin(), v.end()); + } + + template + inline vector toMatVec(const std::vector& v) + { + return vector(v.begin(), v.end()); + } } // namespace MultiArrayTools