diff --git a/octa/string.hh b/octa/string.hh index 2aa849c..2b6b092 100644 --- a/octa/string.hh +++ b/octa/string.hh @@ -479,15 +479,16 @@ AnyString concat(std::initializer_list v, const S &sep = " ") { namespace detail { template - struct ToStringTest { - template struct Test {}; - template static char test(Test *); - template static int test(...); - static constexpr bool value = (sizeof(test(0)) == sizeof(char)); - }; + auto test_tostring(int) -> + decltype(IsSame().to_string()), String>()); + template + False test_tostring(...); template - static True test_iterable(decltype(octa::iter(declval())) *); + using ToStringTest = decltype(test_tostring(0)); + + template + True test_iterable(decltype(octa::iter(declval())) *); template static False test_iterable(...); template