The manual clearly states the format string grammar considers all Unicode Pattern_White_Space codes to not be taken into account. However, as a user, I would expect the following parse to fail since the newline character is explicitly added to the format string. The snippet below succeeds, although to a user it looks like it should fail.
auto result = scn::scan<int, double>("42, 3.14, test", "{}, {}\n");
A workaround is adding a string output and changing the format to "{}, {}{:[c^\n]}". This succeeds if there is a trailing newline, but fails in all other cases.
I understand that there's a tradeoff here between grammar strictness and convenience.
The manual clearly states the format string grammar considers all Unicode Pattern_White_Space codes to not be taken into account. However, as a user, I would expect the following parse to fail since the newline character is explicitly added to the format string. The snippet below succeeds, although to a user it looks like it should fail.
A workaround is adding a string output and changing the format to "{}, {}{:[c^\n]}". This succeeds if there is a trailing newline, but fails in all other cases.
I understand that there's a tradeoff here between grammar strictness and convenience.