template<typename MinType, typename MaxType>
class arg_router::policy::min_max_count_t< MinType, MaxType >
Exposes the number of tokens the owning node will consume.
It also checks that there are enough pending tokens available to reach the minimum in the pre-parse phase.
- Template Parameters
-
MinType | Compile-time integral constant value representing the minimum |
MaxType | Compile-time integral constant value representing the maximum |
Definition at line 27 of file min_max_count.hpp.
template<typename MinType , typename MaxType >
template<typename ProcessedTarget , typename... Parents>
Copies an appropriate amount of tokens from args to result.
This policy performs label and bulk value token processing. If the owning node is named, then the first token is expected to match, if not then false is returned immediately.
Then up to maximum_count()
- Returns
- the
- tokens are processed. If the maximum available is less than minimum_count(), a parse error will occur.
- Template Parameters
-
ProcessedTarget | processed_target payload type |
Parents | Pack of parent tree nodes in ascending ancestry order |
- Parameters
-
tokens | Currently processed tokens |
processed_target | Previously processed parse_target of parent node, or empty is there is no non-root parent |
target | Pre-parse generated target |
parents | Parent node instances |
- Returns
- Either true if successful, or a multi_lang_exception if the minimum count is not reached
Definition at line 72 of file min_max_count.hpp.