Ensure a pointer is provided for a templated iterator type
This commit is contained in:
parent
8338d9e197
commit
e9ee6dd239
@ -265,8 +265,8 @@ DIAGNOSTIC_POP
|
|||||||
}
|
}
|
||||||
|
|
||||||
FlexArray(index_type size) : mSize{size}
|
FlexArray(index_type size) : mSize{size}
|
||||||
{ uninitialized_default_construct_n(mArray, mSize); }
|
{ if(mSize > 0) uninitialized_default_construct_n(std::addressof(mArray[0]), mSize); }
|
||||||
~FlexArray() { destroy_n(mArray, mSize); }
|
~FlexArray() { if(mSize > 0) destroy_n(std::addressof(mArray[0]), mSize); }
|
||||||
|
|
||||||
FlexArray(const FlexArray&) = delete;
|
FlexArray(const FlexArray&) = delete;
|
||||||
FlexArray& operator=(const FlexArray&) = delete;
|
FlexArray& operator=(const FlexArray&) = delete;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user