Proper example

This commit is contained in:
Andreas Tsouchlos 2022-02-13 17:53:17 +01:00
parent 2ecc001a64
commit 3db91aebda

View File

@ -1,8 +1,17 @@
#include <const_fmt/format.h>
#include <iostream>
#include <string_view>
using namespace const_fmt;
int main() {
// TODO
constexpr auto s = "abcdef {:04}"_fmt(123);
// Convert the s (with a type of 'std::array<char, N>') into something
// writable to std::cout
std::string_view sv{&s[0], s.size()};
std::cout << sv << std::endl;
return 0;
}