From a86b1acf6af396aec5eeb0ff02fdddf1db2c0186 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 1 Sep 2024 17:48:29 -0700 Subject: [PATCH] Add mapped_t --- include/fmt/base.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 398d7402..e37b80c7 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -2241,6 +2241,10 @@ template struct arg_mapper { FMT_MAP_API auto map(...) -> unformattable { return {}; } }; +template +using mapped_t = decltype(detail::arg_mapper>::map( + std::declval())); + // A type constant after applying arg_mapper. template using mapped_type_constant = @@ -2909,9 +2913,7 @@ using format_string = basic_format_string...>; template using is_formattable = bool_constant< - !std::is_base_of>::map( - std::declval()))>::value>; + !std::is_base_of>::value>; #ifdef __cpp_concepts template