mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-24 03:35:50 +01: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
@ -160,9 +160,12 @@ class PageAllocator {
|
||||
|
||||
// Wrapper to use with STL containers
|
||||
template <typename T>
|
||||
struct PageStdAllocator : public std::allocator<T> {
|
||||
typedef typename std::allocator<T>::pointer pointer;
|
||||
typedef typename std::allocator<T>::size_type size_type;
|
||||
struct PageStdAllocator {
|
||||
using AllocatorTraits = std::allocator_traits<std::allocator<T>>;
|
||||
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),
|
||||
stackdata_(NULL),
|
||||
|
Loading…
Reference in New Issue
Block a user