18std::ostream&
operator<<(std::ostream& os,
const argument_parser&)
noexcept;
29 const argument_parser& parser,
30 const std::optional<int>
exit_code = std::nullopt,
31 std::ostream&
os = std::cout
44 throw std::filesystem::filesystem_error(
45 "File does not exists!",
47 std::make_error_code(std::errc::no_such_file_or_directory)
57template <argon::util::c_arithmetic T>
61 throw std::out_of_range(
62 std::format(
"Value `{}` must be greater than `{}`!", value,
lower_bound)
72template <argon::util::c_arithmetic T>
76 throw std::out_of_range(
77 std::format(
"Value `{}` must be greater than or equal to `{}`!", value,
lower_bound)
87template <argon::util::c_arithmetic T>
91 throw std::out_of_range(
92 std::format(
"Value `{}` must be less than `{}`!", value,
upper_bound)
102template <argon::util::c_arithmetic T>
106 throw std::out_of_range(
107 std::format(
"Value `{}` must be less than or equal to `{}`!", value,
upper_bound)
123template <argon::util::c_arithmetic T,
bool LeftInclusive = true,
bool RightInclusive = true>
136 throw std::out_of_range(std::format(
137 "Value `{}` must be in interval {}{}, {}{}!",
typename AS::template type< T > callable_type
Template argument action callable type alias.
Defines general action-related helper utility.
util::callable_type< argon::action_type::observe, T > geq(const T lower_bound) noexcept
Returns an observe action which checks if a parsed value is greater than or equal to the given bound.
argon::action_type::on_flag::type print_help(const argument_parser &parser, const std::optional< int > exit_code=std::nullopt, std::ostream &os=std::cout) noexcept
Returns an on-flag action which prints the argument parser's help message.
util::callable_type< argon::action_type::observe, std::string > check_file_exists() noexcept
Returns an observe action which checks whether lower_bound file with the given name exists.
util::callable_type< argon::action_type::observe, T > lt(const T upper_bound) noexcept
Returns an observe action which checks if a parsed value is less than the given bound.
util::callable_type< argon::action_type::observe, T > within(const T lower_bound, const T upper_bound) noexcept
Returns an observe action which checks if a parsed value falls within the specified interval.
util::callable_type< argon::action_type::observe, T > gt(const T lower_bound) noexcept
Returns an observe action which checks if a parsed value is greater than the given bound.
util::callable_type< argon::action_type::observe, T > leq(const T upper_bound) noexcept
Returns an observe action which checks if a parsed value is less than or equal to the given bound.
std::ostream & operator<<(std::ostream &os, const argument_parser &) noexcept
std::function< void()> type