7 #include "arg_router/multi_arg_base.hpp"
8 #include "arg_router/policy/description.hpp"
9 #include "arg_router/policy/none_name.hpp"
10 #include "arg_router/utility/string_to_policy.hpp"
24 template <
typename... Policies>
26 public multi_arg_base_t<vector<std::string_view>, 0, std::decay_t<Policies>...>
30 static_assert(!traits::has_display_name_method_v<forwarding_arg_t> &&
31 !traits::has_long_name_method_v<forwarding_arg_t> &&
32 !traits::has_short_name_method_v<forwarding_arg_t>,
33 "Forwarding arg can only have a none name policy");
36 using typename parent_type::policies_type;
42 template <
bool Flatten>
46 using label = std::decay_t<decltype(
47 parent_type::template default_leaf_help_data_type<Flatten>::label_generator() +
49 parent_type::template default_leaf_help_data_type<Flatten>::count_suffix())>;
51 typename parent_type::template default_leaf_help_data_type<Flatten>::description;
52 using children = std::tuple<>;
64 template <
typename Validator,
bool HasTarget,
typename... Parents>
65 [[nodiscard]] std::optional<parsing::parse_target> pre_parse(
66 parsing::pre_parse_data<Validator, HasTarget> pre_parse_data,
67 const Parents&... parents)
const
70 return parent_type::pre_parse(pre_parse_data, *
this, parents...);
73 template <
typename... Parents>
74 value_type parse(parsing::parse_target&& target,
const Parents&... parents)
const
80 static_assert(!parent_type::template any_phases_v<value_type, policy::has_routing_phase_method>,
81 "Forwarding arg does not support policies with routing phases "
99 template <
typename... Policies>
103 [](
auto... converted_policies) {
105 std::move(converted_policies)...};
110 std::move(policies)...));
typename parent_type::value_type value_type
constexpr forwarding_arg_t(Policies... policies) noexcept
vector< std::string_view > value_type
value_type parse(parsing::parse_target target, const Parents &... parents) const
constexpr auto convert(Params &&... params) noexcept
constexpr auto forwarding_arg(Policies... policies) noexcept