12 #include <string_view>
26 explicit constexpr
arg(std::string_view name) : name_{name} {}
27 std::string_view name()
const {
return name_; }
30 constexpr with_value<T> operator=(T&& value)
32 return {std::string{name_}, std::forward<T>(value)};
36 std::string_view name_;
40 struct is_arg_impl : std::false_type {
44 struct is_arg_impl<arg::with_value<T>> : std::true_type {
48 struct is_arg : is_arg_impl<std::decay_t<T>> {
52 constexpr
bool is_arg_v = is_arg<T>::value;
58 constexpr arg
operator"" _arg(
const char* str, std::size_t)
A named argument.
Definition: arg.h:17
Namespace containing string literals to define arguments.
The packio namespace.
Definition: arg.h:14
A named argument with a value.
Definition: arg.h:21