Renamed result to value and moved testing code
This commit is contained in:
15
src/main.cpp
15
src/main.cpp
@@ -13,23 +13,18 @@ private:
|
||||
|
||||
|
||||
int main() {
|
||||
Uart uart;
|
||||
/* Uart uart;
|
||||
|
||||
Logger logger(uart);
|
||||
logger.log<"Test:{}">(1, 2, 3);
|
||||
|
||||
std::cout << std::endl;
|
||||
|
||||
constexpr auto ast = detail::parse_string<"Test: {:16.8f} {:03.5} {:08.2}">();
|
||||
static_assert(ast.is_valid);
|
||||
*/
|
||||
|
||||
for (const auto& format_node : ast.result) {
|
||||
std::cout << "\tFormat Node:" << std::endl;
|
||||
std::cout << "\t\thas_zero_padding:\t" << format_node.has_zero_padding << std::endl;
|
||||
std::cout << "\t\tlength:\t\t\t\t" << format_node.length << std::endl;
|
||||
std::cout << "\t\tprecision:\t\t\t" << format_node.precision << std::endl;
|
||||
std::cout << "\t\ttype:\t\t\t\t" << static_cast<int>(format_node.type) << std::endl;
|
||||
}
|
||||
constexpr detail::ConstString s{"Test: {:16.8f} {:03.5} {:08.2}"};
|
||||
|
||||
const auto formatted = format<s>(3.4, "abc", 8.98754);
|
||||
|
||||
/*
|
||||
constexpr detail::ConstString s = "{:8.14c}";
|
||||
|
||||
Reference in New Issue
Block a user