7 #include "arg_router/parsing/parse_target.hpp"
13 struct always_returns_true {
14 template <
typename... Args>
15 constexpr
bool operator()([[maybe_unused]] Args&&... args)
const noexcept
28 template <
typename Val
idator,
bool HasTarget>
51 [[nodiscard]]
const Validator&
validator() const noexcept {
return validator_; }
56 const Validator&
validator = [](
const auto&...) {
return true; }) noexcept :
63 std::reference_wrapper<vector<parsing::token_type>> args_;
64 std::reference_wrapper<const Validator> validator_;
89 template <
typename Val
idator,
bool>
107 template <
typename Val
idator>
117 const Validator& validator = detail::always_returns_true{}) noexcept :
138 template <
typename Val
idator>
150 const Validator& validator = detail::always_returns_true{}) noexcept :
163 std::reference_wrapper<const parse_target> target_;
167 template <
typename... T>
170 template <
typename T>
173 template <
typename... T>
175 -> pre_parse_data<detail::always_returns_true, true>;
177 template <
typename T>
179 -> pre_parse_data<T, true>;
pre_parse_data(vector< parsing::token_type > &args, const Validator &validator=detail::always_returns_true{}) noexcept
const parse_target & target() const noexcept
pre_parse_data(vector< parsing::token_type > &args, const parse_target &target, const Validator &validator=detail::always_returns_true{}) noexcept
const vector< parsing::token_type > & args() const noexcept
constexpr static auto has_target
const Validator & validator() const noexcept
vector< parsing::token_type > & args() noexcept
std::vector< T, config::allocator< T > > vector