Skip to content

strange behaviour !! #425

Answered by zeux
ccdric asked this question in Q&A
Jun 10, 2021 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

pugi::xml_parse_result is a struct. You're looking for either

EXPECT_EQ(result.status, pugi::status_ok);

or

EXPECT(result);

What you see is the implicit conversion of result object to a boolean, and a subsequent attempt to compare that boolean (true) to status_ok.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ccdric
Comment options

Answer selected by zeux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants