Proper example
This commit is contained in:
parent
2ecc001a64
commit
3db91aebda
@ -1,8 +1,17 @@
|
|||||||
#include <const_fmt/format.h>
|
#include <const_fmt/format.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
|
using namespace const_fmt;
|
||||||
|
|
||||||
int main() {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user