8#include <userver/utils/time_of_day.hpp>
10#include <userver/formats/common/meta.hpp>
11#include <userver/formats/parse/to.hpp>
13USERVER_NAMESPACE_BEGIN
15namespace formats::
parse {
17template <common::kIsFormatValue Value,
typename Duration>
19 std::optional<std::string> str;
21 str = value.
template As<std::string>();
23 }
catch (
const std::exception& e) {
25 throw typename Value::ParseException(
"'" + *str +
"' cannot be parsed to `utils::datetime::TimeOfDay`");
27 throw typename Value::ParseException(
"Only strings can be parsed as `utils::datetime::TimeOfDay`");