From 88b2b80aed15bb1f931cddd40e44ca525ef10018 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 4 Dec 2015 14:19:04 +0000 Subject: Allow initializing runtime with parsed options. Needed by upcoming refactoring of dex2oat to allow early writing of dex files to the oat file. Change-Id: Ia13c26132846801522f181f51f64035d625e8416 --- runtime/base/bit_utils.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'runtime/base/bit_utils.h') 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 or std::identity, use std::decay. +// Note: Omit the `n` from T type deduction, deduce only from the `x` argument. template -static constexpr T RoundDown(T x, typename std::decay::type n) WARN_UNUSED; +static constexpr T RoundDown(T x, typename Identity::type n) WARN_UNUSED; template -static constexpr T RoundDown(T x, typename std::decay::type n) { +static constexpr T RoundDown(T x, typename Identity::type n) { return DCHECK_CONSTEXPR(IsPowerOfTwo(n), , T(0)) (x & -n); -- cgit v1.2.3-59-g8ed1b