mirror of
https://github.com/yuzu-emu/breakpad
synced 2024-11-22 16:33:43 +00:00
Support building with C++20
std::allocator<T>::pointer and related are removed in C++20, so moving to std::allocator_traits which is available since C++11. Change-Id: Ie67b5c24b27e59edf5595a3575f2794748c3817f Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2894004 Reviewed-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
c484031f1f
commit
5c4b5d89e4
1 changed files with 6 additions and 3 deletions
|
@ -160,9 +160,12 @@ class PageAllocator {
|
||||||
|
|
||||||
// Wrapper to use with STL containers
|
// Wrapper to use with STL containers
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct PageStdAllocator : public std::allocator<T> {
|
struct PageStdAllocator {
|
||||||
typedef typename std::allocator<T>::pointer pointer;
|
using AllocatorTraits = std::allocator_traits<std::allocator<T>>;
|
||||||
typedef typename std::allocator<T>::size_type size_type;
|
using value_type = typename AllocatorTraits::value_type;
|
||||||
|
using pointer = typename AllocatorTraits::pointer;
|
||||||
|
using difference_type = typename AllocatorTraits::difference_type;
|
||||||
|
using size_type = typename AllocatorTraits::size_type;
|
||||||
|
|
||||||
explicit PageStdAllocator(PageAllocator& allocator) : allocator_(allocator),
|
explicit PageStdAllocator(PageAllocator& allocator) : allocator_(allocator),
|
||||||
stackdata_(NULL),
|
stackdata_(NULL),
|
||||||
|
|
Loading…
Reference in a new issue