54 using size_type = std::size_t;
55 using difference_type = std::ptrdiff_t;
56 using propagate_on_container_move_assignment = std::true_type;
73 [[nodiscard]]
static T* allocate(std::size_t size) {
74 if (size > std::numeric_limits<std::size_t>::max() /
sizeof(T)) {
75 throw std::bad_array_new_length{};
78 auto uninitialized_ptr = uniform_allocator_base::allocate(size *
sizeof(T),
alignof(T));
80 if (uninitialized_ptr ==
nullptr) {
81 throw std::bad_alloc{};
84 return static_cast<T*
>(uninitialized_ptr);
87 static void deallocate(T* ptr, std::size_t size)
noexcept {
88 uniform_allocator_base::deallocate(ptr, size *
sizeof(T),
alignof(T));