From 36d14b8ce31700f8f86df7f3a7538aa6d697a176 Mon Sep 17 00:00:00 2001 From: yumeyao Date: Tue, 2 Mar 2021 14:40:33 +0800 Subject: [PATCH] add an extra check if the user mis-declares formatter::store()'s first arguments as non-reference --- include/fmt/fmtlog.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/fmt/fmtlog.h b/include/fmt/fmtlog.h index 16b94341..2ffe6654 100644 --- a/include/fmt/fmtlog.h +++ b/include/fmt/fmtlog.h @@ -67,7 +67,9 @@ using stored_as_string_object = std::integral_constant, typename Formatter = typename Context::template formatter_type> - static std::enable_if_t::value, std::tuple(), std::declval()))>> test(int); + static std::enable_if_t::value, std::tuple(), std::declval()))>> test(double); + template , typename Formatter = typename Context::template formatter_type> + static std::enable_if_t::value, std::tuple(), std::declval()))>> test(int); template static std::tuple test(...); };