From 2dbf4f2c0732879a47e48284353353b89cbe97a9 Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Mon, 27 Jul 2020 19:13:34 +0200 Subject: Fix compile time fmt-variant --- cxxformat.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cxxformat.hpp b/cxxformat.hpp index a5ff4ca..3a45e9f 100644 --- a/cxxformat.hpp +++ b/cxxformat.hpp @@ -561,7 +561,7 @@ namespace detail template std::string format_s() { - if constexpr (i == fmt.size) return ""; + if constexpr (i == fmt.size) return fmt.s; else if constexpr (get(fmt) == '%') { if constexpr (get(fmt) == '%') return substr<0, i, true>(fmt).s + format_s(fmt), 0, argumentIndex>(); @@ -655,4 +655,4 @@ std::string format(Args &&...args) { return detail::format_s(std::forward(args)...); } -} \ No newline at end of file +} -- cgit v1.2.3-54-g00ecf