Implemented format_float in terms of format_int

This commit is contained in:
2022-02-13 23:12:25 +01:00
parent 4666b4e737
commit 9bf3e63058
3 changed files with 48 additions and 6 deletions

View File

@@ -5,7 +5,7 @@
using namespace const_fmt;
int main() {
constexpr auto s = "abcdef {:04}"_const_fmt(123);
constexpr auto s = "abcdef {:9.3}"_const_fmt(-876.3);
// Convert s (with a type of 'std::array<char, N>') into something
// writable to std::cout