| 123456789101112131415161718 |
- #pragma once
- #include <tuple>
- #include <utility>
- #include "string_utils/cast.h"
- #include "string_utils/tokenizer.h"
- namespace string_utils {
- template <typename Tuple>
- struct cast_helper<Tuple, std::enable_if_t<detail::is_tuple<Tuple>{}>> {
- bool operator()(std::string_view str, Tuple &to) const noexcept {
- return maybe_cast<detail::decay_t<Tuple>>(tokenizer(",")(std::string(str)), to);
- }
- };
- }
|