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

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

Issue 2932053002: Use C++11 alignment primitives (Closed)
Patch Set: Fix merge Created 3 years, 6 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
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

Powered by Google App Engine
This is Rietveld 408576698