You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm generally in favor of an optional-like interface.
This depends on #15 since right now "invalid" state is not detected by pugixml.
Also I'm not sure if it makes sense to go with a custom wrapper - I would rather use std::optional if it's available... Of course this would mean that "attribute does not exist" and "there was an error parsing it" would be conflated.
I would rather use std::optional if it's available...
Of course this would mean that "attribute does not exist"
and "there was an error parsing it" would be conflated
i would use std::optional (if available) only internaly in the xml_value - the big benefit is getting rid of the default-value AND have the valid-info - maybe serveral versions of converters needed?
int get_int(int default); // your current
std::optional parse_int // was available?
xml_value try_parse_int // was available AND valid?
its still a huge difference if there is a attribute with valid or invalid content or complete absent of the attribute itself
The text was updated successfully, but these errors were encountered: