Skip to content

add std::optional-like return for your attribute-getters #22

Open
@LowLevelMahn

Description

@LowLevelMahn

its still a huge difference if there is a attribute with valid or invalid content or complete absent of the attribute itself

xml_value<int> try_int()

usage 
xml_value<int> value = attribute("xyz").try_int();

value.exists() = true/false (const)
value.valid() = successfull converted (const)
int x = value // conversion operator (const&)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions