summaryrefslogtreecommitdiff
path: root/runtime/base/bit_utils.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2015-12-08 16:25:47 +0000
committer android-build-merger <android-build-merger@google.com> 2015-12-08 16:25:47 +0000
commit8701fc20130939b9a11f801992607daee7f70871 (patch)
treee998ab6d3aab4e8dfd36f999ca216b07eecb609e /runtime/base/bit_utils.h
parent7c21c7cb329990fed53e9878ef2479e3009bf286 (diff)
parent0b81f1715d6af9f98f982d6511e48973aa5a836a (diff)
Merge "Allow initializing runtime with parsed options." am: e0d25b156e am: 2433d4e17c
am: 0b81f1715d * commit '0b81f1715d6af9f98f982d6511e48973aa5a836a': Allow initializing runtime with parsed options.
Diffstat (limited to 'runtime/base/bit_utils.h')
-rw-r--r--runtime/base/bit_utils.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/base/bit_utils.h b/runtime/base/bit_utils.h
index d6a44f7293..8430d68d0e 100644
--- a/runtime/base/bit_utils.h
+++ b/runtime/base/bit_utils.h
@@ -23,6 +23,7 @@
#include "base/logging.h"
#include "base/iteration_range.h"
+#include "base/stl_util.h"
namespace art {
@@ -108,12 +109,12 @@ static inline int WhichPowerOf2(T x) {
}
// For rounding integers.
-// NOTE: In the absence of std::omit_from_type_deduction<T> or std::identity<T>, use std::decay<T>.
+// Note: Omit the `n` from T type deduction, deduce only from the `x` argument.
template<typename T>
-static constexpr T RoundDown(T x, typename std::decay<T>::type n) WARN_UNUSED;
+static constexpr T RoundDown(T x, typename Identity<T>::type n) WARN_UNUSED;
template<typename T>
-static constexpr T RoundDown(T x, typename std::decay<T>::type n) {
+static constexpr T RoundDown(T x, typename Identity<T>::type n) {
return
DCHECK_CONSTEXPR(IsPowerOfTwo(n), , T(0))
(x & -n);