Commit 42898e80 authored by Kenton Varda's avatar Kenton Varda

Fix compile error with Array<const T>.

For trivial types, we already had this const_cast (line 622), but for non-trivial types it was missing.
parent 54d19bc5
......@@ -631,7 +631,8 @@ struct ArrayDisposer::Dispose_<T, false> {
static void dispose(T* firstElement, size_t elementCount, size_t capacity,
const ArrayDisposer& disposer) {
disposer.disposeImpl(firstElement, sizeof(T), elementCount, capacity, &destruct);
disposer.disposeImpl(const_cast<RemoveConst<T>*>(firstElement),
sizeof(T), elementCount, capacity, &destruct);
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment