From 239aa6911bfa0ea11a4e80b352a354abd8d87d0c Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 16 Sep 2024 20:42:41 -0700 Subject: [PATCH] Remove unwrap_named_arg --- include/fmt/base.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 27443789..2a50e11c 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -1027,20 +1027,9 @@ template struct named_arg : view { const T& value; named_arg(const Char* n, const T& v) : name(n), value(v) {} - static_assert(!is_named_arg::value, "nested named arguments"); }; -template -auto unwrap_named_arg(const named_arg& arg) -> const T& { - return arg.value; -} -template >::value)> -auto unwrap_named_arg(T&& value) -> T&& { - return value; -} - template constexpr auto count() -> size_t { return B ? 1 : 0; } template constexpr auto count() -> size_t { return (B1 ? 1 : 0) + count(); @@ -2181,7 +2170,7 @@ template class value { private: template ())> FMT_CONSTEXPR value(T& x, custom_tag) { - using value_type = remove_cvref_t; + using value_type = remove_const_t; // T may overload operator& e.g. std::vector::reference in libc++. if (!is_constant_evaluated()) { custom.value =