test_mempool.cpp failed to compile when the memory pool was disabled:
/// Return a pointer to a memory block for n elements of type T.
template <typename T>
T*
allocate(size_t num_elements__)
{
#if defined(SIRIUS_USE_MEMORY_POOL)
if (M_ == memory_t::none) {
return nullptr;
}
return static_cast<T*>(memory_pool_allocator_.allocate(num_elements__ * sizeof(T)));
#else
return sirius::allocate<T>(num_elements__, M_);
#endif
}
test_mempool.cpp
failed to compile when the memory pool was disabled:Not quite clear to me why it
allocate<T>(size_t , memory_t)
from https://github.com/electronic-structure/SIRIUS/blob/develop/src/core/memory.hpp#L169 was not considered. Addingsirius::
fixed it.