update headers
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <utils/compressed_pair.h>
|
||||
#include <utils/Panic.h>
|
||||
|
||||
#include <initializer_list>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
@@ -91,6 +92,14 @@ public:
|
||||
construct(begin(), end());
|
||||
}
|
||||
|
||||
FixedCapacityVector(std::initializer_list<T> list,
|
||||
const allocator_type& alloc = allocator_type())
|
||||
: mSize(list.size()),
|
||||
mCapacityAllocator(list.size(), alloc) {
|
||||
mData = this->allocator().allocate(this->capacity());
|
||||
std::uninitialized_copy(list.begin(), list.end(), begin());
|
||||
}
|
||||
|
||||
FixedCapacityVector(size_type size, const_reference value,
|
||||
const allocator_type& alloc = allocator_type())
|
||||
: mSize(size),
|
||||
@@ -322,7 +331,7 @@ private:
|
||||
}
|
||||
|
||||
void construct(iterator first, iterator last, const_reference proto) noexcept {
|
||||
#pragma nounroll
|
||||
UTILS_NOUNROLL
|
||||
while (first != last) {
|
||||
storage_traits::construct(allocator(), first++, proto);
|
||||
}
|
||||
@@ -330,7 +339,7 @@ private:
|
||||
|
||||
// should this be NOINLINE?
|
||||
void construct_non_trivial(iterator first, iterator last) noexcept {
|
||||
#pragma nounroll
|
||||
UTILS_NOUNROLL
|
||||
while (first != last) {
|
||||
storage_traits::construct(allocator(), first++);
|
||||
}
|
||||
@@ -346,7 +355,7 @@ private:
|
||||
|
||||
// should this be NOINLINE?
|
||||
void destroy_non_trivial(iterator first, iterator last) noexcept {
|
||||
#pragma nounroll
|
||||
UTILS_NOUNROLL
|
||||
while (first != last) {
|
||||
storage_traits::destroy(allocator(), --last);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user