#include <format>
#include <gw/inplace_string.hpp>
#include <iostream>
#include <stdexcept>
#include <type_traits>
void print(const auto& str) { std::cout << std::format("{}\n", str); }
auto main() -> int {
try {
print(name);
print(address);
static_assert(std::is_trivial_v<decltype(name)>);
static_assert(std::is_trivial_v<decltype(address)>);
} catch (const std::length_error& ex) {
std::cerr << ex.what() << '\n';
}
}
A fixed-size string that stores the data in-place.
Definition inplace_string.hpp:30