pw_containers: Vector copy and move constructors
Copy and move constructors/assignment operators are not templated.
Having a templated version does not affect the copyability or movability
of the class.
Change-Id: I2ba7ad6d5c929194c41aac7b5108c011c83ca099
diff --git a/pw_containers/public/pw_containers/vector.h b/pw_containers/public/pw_containers/vector.h
index 4dea246..3d222ed 100644
--- a/pw_containers/public/pw_containers/vector.h
+++ b/pw_containers/public/pw_containers/vector.h
@@ -75,10 +75,16 @@
Vector(Iterator first, Iterator last)
: Vector<T, vector_impl::kGeneric>(kMaxSize, first, last) {}
+ Vector(const Vector& other)
+ : Vector<T, vector_impl::kGeneric>(kMaxSize, other) {}
+
template <size_t kOtherMaxSize>
Vector(const Vector<T, kOtherMaxSize>& other)
: Vector<T, vector_impl::kGeneric>(kMaxSize, other) {}
+ Vector(Vector&& other) noexcept
+ : Vector<T, vector_impl::kGeneric>(kMaxSize, std::move(other)) {}
+
template <size_t kOtherMaxSize>
Vector(Vector<T, kOtherMaxSize>&& other) noexcept
: Vector<T, vector_impl::kGeneric>(kMaxSize, std::move(other)) {}