Ensure a pointer is provided for a templated iterator type

This commit is contained in:
Chris Robinson 2020-01-05 23:17:26 -08:00
parent 8338d9e197
commit e9ee6dd239

View File

@ -265,8 +265,8 @@ DIAGNOSTIC_POP
}
FlexArray(index_type size) : mSize{size}
{ uninitialized_default_construct_n(mArray, mSize); }
~FlexArray() { destroy_n(mArray, mSize); }
{ if(mSize > 0) uninitialized_default_construct_n(std::addressof(mArray[0]), mSize); }
~FlexArray() { if(mSize > 0) destroy_n(std::addressof(mArray[0]), mSize); }
FlexArray(const FlexArray&) = delete;
FlexArray& operator=(const FlexArray&) = delete;