diff --git a/include/ss/extract.hpp b/include/ss/extract.hpp index f994430..b10759d 100644 --- a/include/ss/extract.hpp +++ b/include/ss/extract.hpp @@ -33,6 +33,7 @@ std::enable_if_t, T> pow10(int n) { return ret; } +// TODO not working with large number of digits template std::enable_if_t, std::optional> to_num( const char* begin, const char* const end) { diff --git a/include/ss/splitter.hpp b/include/ss/splitter.hpp index 70867f7..9308dd9 100644 --- a/include/ss/splitter.hpp +++ b/include/ss/splitter.hpp @@ -31,22 +31,6 @@ public: 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 {}; @@ -56,30 +40,24 @@ struct trim : matcher {}; template struct escape : matcher {}; -///////////////////////////////////////////////// -// -> type traits -template -struct if_then_else; - -template -struct if_then_else { - using type = T; +template class Template> +struct is_instance_of_matcher { + constexpr static bool value = false; }; -template -struct if_then_else { - using type = U; +template class Template> +struct is_instance_of_matcher, Template> { + constexpr static bool value = true; }; -////////////////////////////////////////////// template