From: Jon Roelofs Date: Thu, 29 Apr 2021 22:36:24 +0000 (-0700) Subject: Partial revert of "Use std::foo_t rather than std::foo in LLVM." in googlebench X-Git-Tag: llvmorg-14-init~7803 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aad3113417369a16ef57291b46594a4e07014eae;p=platform%2Fupstream%2Fllvm.git Partial revert of "Use std::foo_t rather than std::foo in LLVM." in googlebench Since googlebench builds as c++11, the change there is incorrect and breaks the googlebench build when the STL implementation is strict about std::enable_if_t not being available in lesser c++ versions. partial revert of: 1bd6123b781120c9190b9ba58b900cdcb718cdd1 (https://reviews.llvm.org/D74384) Differential Revision: https://reviews.llvm.org/D101583 --- diff --git a/llvm/utils/benchmark/src/sysinfo.cc b/llvm/utils/benchmark/src/sysinfo.cc index 04254bb..01dd8a0 100644 --- a/llvm/utils/benchmark/src/sysinfo.cc +++ b/llvm/utils/benchmark/src/sysinfo.cc @@ -176,8 +176,9 @@ bool GetSysctl(std::string const& Name, std::string* Out) { return true; } -template ::value>> -bool GetSysctl(std::string const &Name, Tp *Out) { +template ::value>::type> +bool GetSysctl(std::string const& Name, Tp* Out) { *Out = 0; auto Buff = GetSysctlImp(Name); if (!Buff) return false;