arg_router
1.4.0
C++ command line argument parsing and routing
|
#include <arg_router/policy/min_max_count.hpp>
Public Types | |
using | type = std::conditional_t< has_min_max, boost::mp11::mp_rename< policies_tuple, tree_node >, boost::mp11::mp_rename< boost::mp11::mp_push_front< policies_tuple, range_policy_type >, tree_node > > |
Static Public Attributes | |
constexpr static auto | has_min_max |
Provides a tree_node type with an unbounded policy::min_max_count_t if a compatible one is not present in Policies.
If no policy implementing minimum_count()
and maximum_count()
methods is in Policies (e.g. policy::min_max_count_t), then an unbounded policy::min_max_count_t is prepended to Policies.
This is used via inheritance in nodes, e.g.:
The constructor specialisation is needed because the parent constructor calls need to match the inherited policies count and order.
MinCount | Minimum count value to use if one not specified by user |
Policies | Pack of policies that define its behaviour |
Definition at line 193 of file min_max_count.hpp.
using arg_router::add_missing_min_max_policy< MinCount, Policies >::type = std::conditional_t< has_min_max, boost::mp11::mp_rename<policies_tuple, tree_node>, boost::mp11::mp_rename<boost::mp11::mp_push_front<policies_tuple, range_policy_type>, tree_node> > |
Equivalent to tree_node<decltype(policy::min_count(0)), Policies...>
if has_min_max is false, otherwise tree_node<Policies...>
Definition at line 217 of file min_max_count.hpp.
|
staticconstexpr |
True if there is no policy implementing minimum_count()
and maximum_count()
methods in Policies.
Definition at line 210 of file min_max_count.hpp.