From 12536e06e5269a26afb7209f2a6790f9fc03f7e7 Mon Sep 17 00:00:00 2001 From: Taiju Tsuiki Date: Tue, 8 Mar 2016 17:35:47 +0900 Subject: [PATCH] Replace base/template_util.h stuff with C++11 type_traits BUG=chromium:554293 Change-Id: I5fe06bcba261dd770f1882519b541f870f4a1e62 Reviewed-on: https://chromium-review.googlesource.com/331150 Reviewed-by: Mark Mentovai --- compat/non_cxx11_lib/type_traits | 5 +++++ util/win/process_info.cc | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/compat/non_cxx11_lib/type_traits b/compat/non_cxx11_lib/type_traits index 9f11fd4a..e56c220a 100644 --- a/compat/non_cxx11_lib/type_traits +++ b/compat/non_cxx11_lib/type_traits @@ -30,6 +30,11 @@ struct remove_reference { using type = T; }; template struct remove_reference { using type = T; }; +template +struct is_same { enum { value = false }; }; +template +struct is_same { enum { value = true }; }; + } // namespace std #endif // CXX_LIBRARY_VERSION diff --git a/util/win/process_info.cc b/util/win/process_info.cc index 5628e04b..9e47206d 100644 --- a/util/win/process_info.cc +++ b/util/win/process_info.cc @@ -18,11 +18,11 @@ #include #include +#include #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/strings/stringprintf.h" -#include "base/template_util.h" #include "build/build_config.h" #include "util/numeric/safe_assignment.h" #include "util/win/get_function.h" @@ -636,9 +636,9 @@ std::vector> GetReadableRangesOfMemoryMap( // Find all the ranges that overlap the target range, maintaining their order. ProcessInfo::MemoryBasicInformation64Vector overlapping; for (const auto& mi : memory_info) { - static_assert(base::is_same::value, + static_assert(std::is_same::value, "expected range address to be WinVMAddress"); - static_assert(base::is_same::value, + static_assert(std::is_same::value, "expected range size to be WinVMSize"); if (range.OverlapsRange(Range(mi.BaseAddress, mi.RegionSize))) overlapping.push_back(mi);