Initial commit
This commit is contained in:
23
mimalloc/all/patches/2.2.4-0002-support-older-compiler.patch
Normal file
23
mimalloc/all/patches/2.2.4-0002-support-older-compiler.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
diff --git a/include/mimalloc.h b/include/mimalloc.h
|
||||
index bd91db4..f6aa1aa 100644
|
||||
--- a/include/mimalloc.h
|
||||
+++ b/include/mimalloc.h
|
||||
@@ -555,7 +555,7 @@ template<class T, bool _mi_destroy> struct _mi_heap_stl_allocator_common : publi
|
||||
#endif
|
||||
|
||||
void collect(bool force) { mi_heap_collect(this->heap.get(), force); }
|
||||
- template<class U> bool is_equal(const _mi_heap_stl_allocator_common<U, _mi_destroy>& x) const { return (this->heap == x.heap); }
|
||||
+ template<class U, bool b> bool is_equal(const _mi_heap_stl_allocator_common<U, b>& x) const { return (this->heap == x.heap); }
|
||||
|
||||
protected:
|
||||
std::shared_ptr<mi_heap_t> heap;
|
||||
@@ -566,7 +566,8 @@ protected:
|
||||
this->heap.reset(hp, (_mi_destroy ? &heap_destroy : &heap_delete)); /* calls heap_delete/destroy when the refcount drops to zero */
|
||||
}
|
||||
_mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common& x) mi_attr_noexcept : heap(x.heap) { }
|
||||
- template<class U> _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common<U, _mi_destroy>& x) mi_attr_noexcept : heap(x.heap) { }
|
||||
+ template<class U, bool b> _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common<U, b>& x) mi_attr_noexcept : heap(x.heap)
|
||||
+ { }
|
||||
|
||||
private:
|
||||
static void heap_delete(mi_heap_t* hp) { if (hp != NULL) { mi_heap_delete(hp); } }
|
||||
Reference in New Issue
Block a user