Inherits arg_router::dependency::detail::basic_one_of_t< ParentDocName, Params >.
template<typename... Params>
class arg_router::dependency::one_of_t< Params >
Groups child nodes such that any one can be used on the command line, but only one.
The value_type is a variant of all the policies' value_types that are not derived from policy::no_result_value. If that list is only a single type, then it collapses into just that type (i.e. it won't be a variant containing a single type).
- Template Parameters
-
Params | Policies and child node types for the mode |
Definition at line 20 of file one_of.hpp.
template<typename... Params>
template<typename Validator , bool HasTarget, typename... Parents>
Propagates the pre-parse phase to the child, returns on a positive return from one of them.
- Template Parameters
-
Validator | Validator type |
HasTarget | True if pre_parse_data contains the parent's parse_target |
Parents | Pack of parent tree nodes in ascending ancestry order |
- Parameters
-
pre_parse_data | Pre-parse data aggregate |
parents | Parent node instances |
- Returns
- Non-empty if the leading tokens in args are consumable by this node
- Exceptions
-
multi_lang_exception | Thrown if any of the child pre-parse implementations have returned an exception, or if called more than once resolving to different children (i.e. a "one of" violation) |
Definition at line 84 of file one_of.hpp.