#pragma once #include "type_traits.hpp" #include #include #include #include // TODO remove #include namespace ss { 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; }; template struct quote : matcher {}; template struct trim : matcher {}; template struct escape : matcher {}; template class Template> struct is_instance_of_matcher { constexpr static bool value = false; }; template class Template> struct is_instance_of_matcher, Template> { constexpr static bool value = true; }; template