#ifndef PULSEFOLD_ARGUMENTS_HPP #define PULSEFOLD_ARGUMENTS_HPP #include #include #include #include #include #include namespace arguments { using Time = std::uint64_t; using Id = std::uint32_t; inline Time integer(std::string_view text) { Time value; const auto parsed = std::from_chars(text.data(), text.data() + text.size(), value); if (parsed.ec != std::errc() || parsed.ptr != text.data() + text.size()) throw std::invalid_argument("expected an unsigned decimal integer"); return value; } inline Id feed_count(std::string_view text) { const auto value = integer(text); if (value == 0 || value > std::numeric_limits::max()) throw std::invalid_argument("feed count outside 1..UINT32_MAX"); return static_cast(value); } inline std::vector