template <class T> class secure_mem_allocator : public std::allocator<T>
{
public:
- using pointer = typename std::allocator<T>::pointer;
+ using value_type = typename std::allocator<T>::value_type;
using size_type = typename std::allocator<T>::size_type;
template<class U> struct rebind { typedef secure_mem_allocator<U> other; };
secure_mem_allocator() noexcept = default;
secure_mem_allocator(const secure_mem_allocator &_) noexcept : std::allocator<T>(_) {}
template <class U> explicit secure_mem_allocator(const secure_mem_allocator<U>&) noexcept {}
- void deallocate(pointer p, size_type num) noexcept {
+ void deallocate(value_type *p, size_type num) noexcept {
rspamd_explicit_memzero((void *)p, num);
std::allocator<T>::deallocate(p, num);
}