diff --git a/ostd/argparse.hh b/ostd/argparse.hh index 72f373e..36a2be3 100644 --- a/ostd/argparse.hh +++ b/ostd/argparse.hh @@ -50,16 +50,24 @@ struct arg_error: std::runtime_error { {} }; -/** @brief The range type passed to argument action callbacks. +/** @brief A contiguous range type used for argument values. * - * The `T` template argument is a character type. Usually it will be - * just `char` but you might want to do UTF-16 or UTF-32 input. The - * actual range type is an ostd::contiguous_range_tag and contains - * `const` ostd::basic_char_range with `T const` and the traits type - * which is std::char_traits for `T` by default. + * This range type has immutable contents and doesn't own its memory. It + * is represented as a regular string slice with the appropraite character + * and traits types. The `T` template type is a character type, usually + * a `char` but can be `wchar_t`, `char16_t`, `char32_t` as well. The + * `TR` template type is the traits type, by default std::char_traits + * for `T`. */ template> -using arg_value_range = iterator_range const *>; +using arg_value_type = basic_char_range; + +/** @brief The range type passed to argument action callbacks. + * + * It's a contiguous range of `const` ostd::arg_value_type. + */ +template> +using arg_value_range = iterator_range const *>; /** @brief The type of an argument class. */ enum class arg_type {