From 5eb99490e323563b6450f869afa0b2f5edad8c3a Mon Sep 17 00:00:00 2001 From: Feng Yu Date: Thu, 1 Sep 2022 13:42:34 +0800 Subject: [PATCH] src: simplify enable_if logic of `ToStringHelper::BaseConvert` PR-URL: https://github.com/nodejs/node/pull/44306 Reviewed-By: James M Snell Reviewed-By: Darshan Sen --- src/debug_utils-inl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debug_utils-inl.h b/src/debug_utils-inl.h index d87dd62c8952af..0fb760834d5792 100644 --- a/src/debug_utils-inl.h +++ b/src/debug_utils-inl.h @@ -29,7 +29,7 @@ struct ToStringHelper { static std::string Convert(bool value) { return value ? "true" : "false"; } template ::value, int>::type = 0> + typename = std::enable_if_t>> static std::string BaseConvert(const T& value) { auto v = static_cast(value); char ret[3 * sizeof(T)]; @@ -45,7 +45,7 @@ struct ToStringHelper { } template ::value, int>::type = 0> + typename = std::enable_if_t>> static std::string BaseConvert(T value) { return Convert(std::forward(value)); }