diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2020-07-27 19:13:34 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2020-07-27 19:13:34 +0200 |
| commit | 2dbf4f2c0732879a47e48284353353b89cbe97a9 (patch) | |
| tree | 231d5f07e55b07240889be4c072465ba775856fd | |
| parent | 00775aa16ffa28fcd822aa02ce5f99e626b7e874 (diff) | |
| download | cxxformat-2dbf4f2c0732879a47e48284353353b89cbe97a9.tar.gz cxxformat-2dbf4f2c0732879a47e48284353353b89cbe97a9.zip | |
Fix compile time fmt-variant
| -rw-r--r-- | cxxformat.hpp | 4 |
1 files 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<auto fmt, size_t i, size_t argumentIndex> std::string format_s() { - if constexpr (i == fmt.size) return ""; + if constexpr (i == fmt.size) return fmt.s; else if constexpr (get<i>(fmt) == '%') { if constexpr (get<i + 1>(fmt) == '%') return substr<0, i, true>(fmt).s + format_s<substr<i + 2>(fmt), 0, argumentIndex>(); @@ -655,4 +655,4 @@ std::string format(Args &&...args) { return detail::format_s<fmt, 0, 1>(std::forward<Args>(args)...); } -}
\ No newline at end of file +} |
