Disable to_string_view ADL
This commit is contained in:
+3
-3
@@ -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>> {
|
||||
|
||||
Reference in New Issue
Block a user