summaryrefslogtreecommitdiff
path: root/runtime/base/allocator.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2018-01-03 15:47:24 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-01-03 15:47:24 +0000
commitb0ddceb337f614dc2600d19b82fb4a6596aa7d4c (patch)
treeed9d3cb8668c54b0274653de2bbd7c90b08fa3ea /runtime/base/allocator.h
parent00359cd27da40020e0a539515590fac3a46be1e4 (diff)
parent38b8b25b7deff92627586405c80182a19e7c18f9 (diff)
Merge changes Idd405a2c,I7052da55
* changes: ART: Faster type check bitstring initialization. Replace TypeStaticIf<> with std::conditional<> (C++11).
Diffstat (limited to 'runtime/base/allocator.h')
-rw-r--r--runtime/base/allocator.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/base/allocator.h b/runtime/base/allocator.h
index 99cdb49984..3cedb66abe 100644
--- a/runtime/base/allocator.h
+++ b/runtime/base/allocator.h
@@ -17,10 +17,11 @@
#ifndef ART_RUNTIME_BASE_ALLOCATOR_H_
#define ART_RUNTIME_BASE_ALLOCATOR_H_
+#include <type_traits>
+
#include "atomic.h"
#include "base/macros.h"
#include "base/mutex.h"
-#include "base/type_static_if.h"
namespace art {
@@ -147,9 +148,9 @@ class TrackingAllocatorImpl : public std::allocator<T> {
template<class T, AllocatorTag kTag>
// C++ doesn't allow template typedefs. This is a workaround template typedef which is
// TrackingAllocatorImpl<T> if kEnableTrackingAllocator is true, std::allocator<T> otherwise.
-using TrackingAllocator = typename TypeStaticIf<kEnableTrackingAllocator,
- TrackingAllocatorImpl<T, kTag>,
- std::allocator<T>>::type;
+using TrackingAllocator = typename std::conditional<kEnableTrackingAllocator,
+ TrackingAllocatorImpl<T, kTag>,
+ std::allocator<T>>::type;
} // namespace art