commit 8ee03f42119a1adb2225db84b4700aed78fa86d0
parent 6dd3ad7d6d459ba1b6602aea375a55cd40a21cf9
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date: Tue, 6 Sep 2016 16:44:46 +0300
Fix double percent symbol in value_fmt
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/kfr/cometa/string.hpp b/include/kfr/cometa/string.hpp
@@ -114,7 +114,8 @@ CMT_INLINE constexpr auto value_fmt(ctype_t<ctype_t<T>>)
template <typename T, int width, int prec>
CMT_INLINE constexpr auto value_fmt(ctype_t<fmt_t<T, static_cast<char>(-1), width, prec>> fmt)
{
- return concat_cstring(make_cstring("%"), value_fmt_arg(fmt), value_fmt(ctype<repr_type<T>>));
+ return concat_cstring(make_cstring("%"), value_fmt_arg(fmt),
+ value_fmt(ctype<repr_type<T>>).slice(csize<1>));
}
template <typename T, char t, int width, int prec>
CMT_INLINE constexpr auto value_fmt(ctype_t<fmt_t<T, t, width, prec>> fmt)