I'm using json-spirit to parse json for my ws++ server.
I'm comparing strings for validation of the signup process, confirmed logins, email, password, etc.
json-spirit's get_str()
returns const std::string&
.
I've tried ==
, compare
, even strcmp
. All crash the program with terminate called after throwing an instance of 'std::runtime_error' what(): value type is 0 not 2
when I try to compare the function returns with a "1 liner" (all in the if
comparison statement).
Can this function be returned using a 1-liner?