|
|
@@ -114,6 +114,14 @@ template <typename T> struct cast_helper<T, std::enable_if_t<detail::is_tuple<T>
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+template <typename T>
|
|
|
+struct cast_helper<T, std::enable_if_t<std::is_constructible_v<T, std::string_view>>> {
|
|
|
+ bool operator()(std::string_view str, T & to) const noexcept {
|
|
|
+ to = str;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
template <typename... Ts>
|
|
|
struct cast_helper<std::variant<Ts...>> {
|
|
|
bool operator()(std::string_view str, std::variant<Ts...> & to) const noexcept {
|