diff --git a/include/ss/converter.hpp b/include/ss/converter.hpp index f2e0433..1d5af37 100644 --- a/include/ss/converter.hpp +++ b/include/ss/converter.hpp @@ -2,6 +2,7 @@ #include "extract.hpp" #include "function_traits.hpp" #include "restrictions.hpp" +#include "splitter.hpp" #include "type_traits.hpp" #include #include @@ -105,347 +106,6 @@ constexpr bool tied_class_v = tied_class::value; // the error can be set inside a string, or a bool enum class error_mode { error_string, error_bool }; -//////////////////////////////////////////////////////// -//////////////////////////////////////////////////////// -//////////////////////////////////////////////////////// -//////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -template -struct matcher { -private: - template - static bool match_impl(char c) { - if constexpr (sizeof...(Xs) != 0) { - return (c == X) || match_impl(c); - } - return (c == X); - } - -public: - static bool match(char c) { - return match_impl(c); - } - constexpr static bool enabled = true; -}; - -template <> -class matcher<'\0'> { -public: - constexpr static bool enabled = false; - static bool match(char c) = delete; -}; - -//////////////// -// is instance of -//////////////// - -template class Template> -struct is_instance_of_char { - constexpr static bool value = false; -}; - -template class Template> -struct is_instance_of_char, Template> { - constexpr static bool value = true; -}; - -/////////////////////////////////////////////////// - -template -struct quote : matcher {}; - -template -struct trim : matcher {}; - -template -struct escape : matcher {}; - -///////////////////////////////////////////////// -// -> type traits -template -struct if_then_else; - -template -struct if_then_else { - using type = T; -}; - -template -struct if_then_else { - using type = U; -}; - -////////////////////////////////////////////// -template