Take the last argument if given multiple times (or another policy)
| 3936 | |
| 3937 | /// Take the last argument if given multiple times (or another policy) |
| 3938 | Option *multi_option_policy(MultiOptionPolicy value = MultiOptionPolicy::Throw) { |
| 3939 | if (value != multi_option_policy_) { |
| 3940 | if (multi_option_policy_ == MultiOptionPolicy::Throw && expected_max_ == detail::expected_max_vector_size && |
| 3941 | expected_min_ > 1) { // this bizarre condition is to maintain backwards compatibility |
| 3942 | // with the previous behavior of expected_ with vectors |
| 3943 | expected_max_ = expected_min_; |
| 3944 | } |
| 3945 | multi_option_policy_ = value; |
| 3946 | current_option_state_ = option_state::parsing; |
| 3947 | } |
| 3948 | return this; |
| 3949 | } |
| 3950 | |
| 3951 | /// Disable flag overrides values, e.g. --flag=<value> is not allowed |
| 3952 | Option *disable_flag_override(bool value = true) { |
no outgoing calls
no test coverage detected