From ad70c662e49c48b413a8958314a696cfb34dc72a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 21:11:54 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- transformer_engine/common/util/string.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/transformer_engine/common/util/string.h b/transformer_engine/common/util/string.h index fc580c51d1..3b0db02809 100644 --- a/transformer_engine/common/util/string.h +++ b/transformer_engine/common/util/string.h @@ -18,22 +18,20 @@ inline const std::string &to_string_like(const std::string &val) noexcept { retu constexpr const char *to_string_like(const char *val) noexcept { return val; } /* \brief Convert arithmetic type to string */ -template ::value>::type> +template ::value>::type> inline std::string to_string_like(const T &val) { return std::to_string(val); } /* \brief Convert container to string */ -template ::value>::type, +template ::value>::type, typename = decltype(std::declval().begin())> inline std::string to_string_like(const T &container) { std::string str; str.reserve(1024); // Assume strings are <1 KB str += "("; bool first = true; - for (const auto &val: container) { + for (const auto &val : container) { if (!first) { str += ","; }