Avoid compilation error when passing in heap to allocators

Before it would not work to create the mi_heap_stl_allocator types with
passing in a "mi_heap_t*", since sizeof is used and it gives a
compilation error. This change fixes that.
This commit is contained in:
Teodor Spæren 2024-03-09 14:13:33 +01:00
parent db52999d85
commit 068dc014ec

View File

@ -487,6 +487,7 @@ template<class T1,class T2> bool operator!=(const mi_stl_allocator<T1>& , const
#define MI_HAS_HEAP_STL_ALLOCATOR 1
#include <memory> // std::shared_ptr
#include "mimalloc/types.h"
// Common base class for STL allocators in a specific heap
template<class T, bool _mi_destroy> struct _mi_heap_stl_allocator_common : public _mi_stl_allocator_common<T> {