Unverified Commit 0ac813d9 authored by Kenton Varda's avatar Kenton Varda Committed by GitHub

Merge pull request #797 from capnproto/fix-const-array-disposer

Fix compile error with Array<const T>.
parents 54d19bc5 42898e80
...@@ -631,7 +631,8 @@ struct ArrayDisposer::Dispose_<T, false> { ...@@ -631,7 +631,8 @@ struct ArrayDisposer::Dispose_<T, false> {
static void dispose(T* firstElement, size_t elementCount, size_t capacity, static void dispose(T* firstElement, size_t elementCount, size_t capacity,
const ArrayDisposer& disposer) { 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