Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1827)

Unified Diff: third_party/crashpad/crashpad/util/stdlib/aligned_allocator.h

Issue 2670873002: Remove base's ALIGNOF/ALIGNAS in favor of alignof/alignas. (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/crashpad/crashpad/minidump/minidump_extensions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/crashpad/crashpad/util/stdlib/aligned_allocator.h
diff --git a/third_party/crashpad/crashpad/util/stdlib/aligned_allocator.h b/third_party/crashpad/crashpad/util/stdlib/aligned_allocator.h
index 04d3dc46cd279031ad55a6641fa03bccc842581f..e8b72c7aa2034bf38e83e370f443bb7328e0550c 100644
--- a/third_party/crashpad/crashpad/util/stdlib/aligned_allocator.h
+++ b/third_party/crashpad/crashpad/util/stdlib/aligned_allocator.h
@@ -23,7 +23,6 @@
#include <utility>
#include <vector>
-#include "base/compiler_specific.h"
#include "build/build_config.h"
#include "util/stdlib/cxx.h"
@@ -55,7 +54,7 @@ void AlignedFree(void* pointer);
//! This is similar to `std::allocator<T>`, with the addition of an alignment
//! guarantee. \a Alignment must be a power of 2. If \a Alignment is not
//! specified, the default alignment for type \a T is used.
-template <class T, size_t Alignment = ALIGNOF(T)>
+template <class T, size_t Alignment = alignof(T)>
struct AlignedAllocator {
public:
using value_type = T;
@@ -130,7 +129,7 @@ bool operator!=(const AlignedAllocator<T1, Alignment>& lhs,
//! This is similar to `std::vector<T>`, with the addition of an alignment
//! guarantee. \a Alignment must be a power of 2. If \a Alignment is not
//! specified, the default alignment for type \a T is used.
-template <typename T, size_t Alignment = ALIGNOF(T)>
+template <typename T, size_t Alignment = alignof(T)>
using AlignedVector = std::vector<T, AlignedAllocator<T, Alignment>>;
} // namespace crashpad
« no previous file with comments | « third_party/crashpad/crashpad/minidump/minidump_extensions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698