Skip to content

Add support to store values in std::optional variables.#71

Open
qwattash wants to merge 1 commit intomuellan:masterfrom
qwattash:master
Open

Add support to store values in std::optional variables.#71
qwattash wants to merge 1 commit intomuellan:masterfrom
qwattash:master

Conversation

@qwattash
Copy link
Copy Markdown

This allows to use clipp::value("foo", myoptional) directly as in:

std::optional<int> foo;

auto cli = (clipp::option("-n"), clipp::value("howmany", foo));

This is not strictly required as generally one can work with defaults, but I feel is a nice semantic addition.

This allows to use clipp::value("foo", myoptional) directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant