|
|
|
@ -9,6 +9,7 @@
|
|
|
|
|
#include <support/lockedpool.h>
|
|
|
|
|
#include <support/cleanse.h>
|
|
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
@ -17,15 +18,13 @@
|
|
|
|
|
//
|
|
|
|
|
template <typename T>
|
|
|
|
|
struct secure_allocator : public std::allocator<T> {
|
|
|
|
|
// MSVC8 default copy constructor is broken
|
|
|
|
|
typedef std::allocator<T> base;
|
|
|
|
|
typedef typename base::size_type size_type;
|
|
|
|
|
typedef typename base::difference_type difference_type;
|
|
|
|
|
typedef typename base::pointer pointer;
|
|
|
|
|
typedef typename base::const_pointer const_pointer;
|
|
|
|
|
typedef typename base::reference reference;
|
|
|
|
|
typedef typename base::const_reference const_reference;
|
|
|
|
|
typedef typename base::value_type value_type;
|
|
|
|
|
using base = std::allocator<T>;
|
|
|
|
|
using traits = std::allocator_traits<base>;
|
|
|
|
|
using size_type = typename traits::size_type;
|
|
|
|
|
using difference_type = typename traits::difference_type;
|
|
|
|
|
using pointer = typename traits::pointer;
|
|
|
|
|
using const_pointer = typename traits::const_pointer;
|
|
|
|
|
using value_type = typename traits::value_type;
|
|
|
|
|
secure_allocator() noexcept {}
|
|
|
|
|
secure_allocator(const secure_allocator& a) noexcept : base(a) {}
|
|
|
|
|
template <typename U>
|
|
|
|
|