6#include <userver/utils/meta_light.hpp>
17template <
typename T,
typename DbType>
18using HasConvert =
decltype(Convert(std::declval<DbType&&>(),
convert::To<T>{}));
20template <
typename T,
typename DbType>
21inline constexpr bool kHasConvert = meta::kIsDetected<HasConvert, T, DbType>;
25template <
typename T,
typename DbType>
26T DoConvert(DbType&& from) {
29 impl::kHasConvert<T, DbType>,
30 "There is no 'T Convert(From&&, storages::mysql::convert::To<T>)' in "
31 "neither namespace of 'T' or `storages::mysql::convert`"
34 return Convert(std::forward<DbType>(from), To<T>{});