|
@@ -137,6 +137,11 @@ bool cast(Out & out, std::vector<std::string_view> const & strs) noexcept {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+template <typename Out, typename S>
|
|
|
|
|
+bool cast(Out & out, std::vector<S> const & strs) noexcept {
|
|
|
|
|
+ return cast(out, std::vector<std::string_view>(strs.begin(), strs.end()));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
template <typename T> std::pair<T, bool> cast(std::string_view str) noexcept {
|
|
template <typename T> std::pair<T, bool> cast(std::string_view str) noexcept {
|
|
|
std::pair<detail::decay_t<T>, bool> rval;
|
|
std::pair<detail::decay_t<T>, bool> rval;
|
|
|
using ::string_utils::cast;
|
|
using ::string_utils::cast;
|
|
@@ -146,7 +151,7 @@ template <typename T> std::pair<T, bool> cast(std::string_view str) noexcept {
|
|
|
|
|
|
|
|
template <typename T, typename S>
|
|
template <typename T, typename S>
|
|
|
std::pair<T, bool> cast(std::vector<S> const & strs) noexcept {
|
|
std::pair<T, bool> cast(std::vector<S> const & strs) noexcept {
|
|
|
- std::vector<std::string_view> tmp{strs.begin(), strs.end()};
|
|
|
|
|
|
|
+ std::vector<std::string_view> tmp(strs.begin(), strs.end());
|
|
|
std::pair<detail::decay_t<T>, bool> rval;
|
|
std::pair<detail::decay_t<T>, bool> rval;
|
|
|
using ::string_utils::cast;
|
|
using ::string_utils::cast;
|
|
|
rval.second = cast(rval.first, tmp);
|
|
rval.second = cast(rval.first, tmp);
|