parser icon indicating copy to clipboard operation
parser copied to clipboard

string_parser needs to initialize success flag

Open cppljevans opened this issue 6 months ago • 0 comments

The string_parser::call needs to initialize the success out value to true.

Here, in the string_parser::call function:

https://github.com/tzlaine/parser/blob/develop/include/boost/parser/parser.hpp#L6913

the only change to the success flag is to false. This is definitely wrong. It needs to be initialized to true at the start of the function. Otherwise, if the success flag is passed as false, it will not change its value, despite the parse being successful.

cppljevans avatar Aug 11 '24 08:08 cppljevans