Fix DealloctingVector from initializer list constructor

It was not setting the number of elements.
This commit is contained in:
Patrick Niklaus 2018-03-22 11:12:14 +00:00
parent c410c200bd
commit ee447afd72

View File

@ -228,9 +228,9 @@ template <typename ElementT> class DeallocatingVector
return *this; return *this;
} }
DeallocatingVector(std::initializer_list<ElementT> elements) DeallocatingVector(std::initializer_list<ElementT> elements) : DeallocatingVector()
{ {
for (auto && elem : elements) for (auto &&elem : elements)
{ {
emplace_back(std::move(elem)); emplace_back(std::move(elem));
} }