parse_string now successfully returns an array of format_node objects

This commit is contained in:
Andreas Tsouchlos 2021-11-19 18:27:46 +01:00
parent bb24f86d5d
commit c3ed767e82
2 changed files with 2 additions and 2 deletions

View File

@ -244,7 +244,7 @@ constexpr parse_result_t<string_result_t<count_braces<s>()>> parse_string() {
return {false, i, {}};
}
i = new_i;
result.result[format_node_pos] = format_node;
result.result[format_node_pos++] = format_node;
} else if (s[i] == '}') {
return {false, i, {}};

View File

@ -20,7 +20,7 @@ int main() {
std::cout << std::endl;
constexpr auto ast = detail::parse_string<"Test: {:16.8} {:03.5} {:08.2}">();
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) {