7 #include "arg_router/multi_arg_base.hpp"
8 #include "arg_router/policy/description.hpp"
9 #include "arg_router/policy/long_name.hpp"
10 #include "arg_router/policy/short_name.hpp"
11 #include "arg_router/utility/string_to_policy.hpp"
21 template <
typename T,
typename... Policies>
25 policy::min_max_count_t<traits::integral_constant<std::size_t{1}>,
26 traits::integral_constant<std::size_t{1}>>,
27 std::decay_t<Policies>...>
34 std::decay_t<Policies>...>;
36 static_assert(!traits::has_none_name_method_v<arg_t>,
"Arg must not have a none name policy");
37 static_assert(!traits::has_display_name_method_v<arg_t>,
38 "Arg must not have a display name policy");
41 using typename parent_type::policies_type;
47 template <
bool Flatten>
48 using help_data_type =
typename parent_type::template default_leaf_help_data_type<Flatten>;
54 constexpr
explicit arg_t(Policies... policies) noexcept :
57 std::move(policies)...}
61 template <
typename Validator,
bool HasTarget,
typename... Parents>
62 [[nodiscard]] std::optional<parsing::parse_target> pre_parse(
63 parsing::pre_parse_data<Validator, HasTarget> pre_parse_data,
64 const Parents&... parents)
const
67 return parent_type::pre_parse(pre_parse_data, *
this, parents...);
70 template <
typename... Parents>
71 value_type parse(parsing::parse_target&& target,
const Parents&... parents)
const
97 template <
typename T,
typename... Policies>
98 [[nodiscard]] constexpr
auto arg(Policies... policies) noexcept
101 [](
auto... converted_policies) {
102 return arg_t<T, std::decay_t<decltype(converted_policies)>...>{
103 std::move(converted_policies)...};
109 std::move(policies)...));
typename parent_type::value_type value_type
typename parent_type::template default_leaf_help_data_type< Flatten > help_data_type
constexpr arg_t(Policies... policies) noexcept
value_type parse(parsing::parse_target target, const Parents &... parents) const
std::integral_constant< decltype(Value), Value > integral_constant
constexpr auto convert(Params &&... params) noexcept
constexpr auto arg(Policies... policies) noexcept