#include namespace seafire::server { std::optional string_parameter_t:: try_parse(std::optional const& input) { return input; } std::optional int_parameter_t:: try_parse(std::optional const& input) { try { if (input) { return std::stoll(*input); } return std::nullopt; } catch (...) { return std::nullopt; } } std::optional uint_parameter_t:: try_parse(std::optional const& input) { try { if (input) { return std::stoull(*input); } return std::nullopt; } catch (...) { return std::nullopt; } } } // namespace seafire::server