fixes recurring bug

This commit is contained in:
2022-10-26 05:52:48 +08:00
parent 31d823ac89
commit 3120763966
4 changed files with 24 additions and 14 deletions
+9
View File
@@ -75,6 +75,15 @@ public:
this->name = name;
}
template<template <typename> class VT, typename T>
void initfrom(VT<T>&& v, const char* name = "") {
ty = types::Types<_Ty>::getType();
this->size = v.size;
this->capacity = v.capacity;
this->container = (_Ty*)(v.container);
this->name = name;
v.capacity = 0;
}
template<template <typename> class VT, typename T>
void initfrom(const VT<T>& v, const char* name = "") {
ty = types::Types<_Ty>::getType();
this->size = v.size;