Disable to_string_view ADL

This commit is contained in:
Victor Zverovich
2023-04-09 08:49:05 -07:00
parent 466e0650ec
commit 02bf4d1c1c
4 changed files with 4 additions and 55 deletions
+3 -3
View File
@@ -546,10 +546,10 @@ void to_string_view(...);
// Specifies whether S is a string type convertible to fmt::basic_string_view.
// It should be a constexpr function but MSVC 2017 fails to compile it in
// enable_if and MSVC 2015 fails to compile it as an alias template.
// ADL invocation of to_string_view is DEPRECATED!
// ADL is intentionally disabled as to_string_view is not an extension point.
template <typename S>
struct is_string : std::is_class<decltype(to_string_view(std::declval<S>()))> {
};
struct is_string
: std::is_class<decltype(detail::to_string_view(std::declval<S>()))> {};
template <typename S, typename = void> struct char_t_impl {};
template <typename S> struct char_t_impl<S, enable_if_t<is_string<S>::value>> {