Skip to content

Question: Option requires one of two other options #1034

@ptc-tgamper

Description

@ptc-tgamper

Hi,

I am in the situation where I have options -D, -E, and -F. What I need is that if -D is provided, then exactly one of -E and -F has to be specified, too.
Providing -D with -E is valid. Providing -D with -F is valid.
Providing only -D is invalid. Providing -D, -E, and -F is invalid. Providing only -E is invalid. Providing only -F is invalid.

I haven't found a way to do this yet.

Otherwise I am really happy with CLI11 and the functionality it provides. Kudos to the authors.

Thanks,
Thomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions