Disable is_streamable for string[_view]
This commit is contained in:
parent
91533d3c33
commit
e4f0564aa6
@ -45,6 +45,8 @@ struct is_streamable<
|
||||
enable_if_t<
|
||||
std::is_arithmetic<T>::value || std::is_array<T>::value ||
|
||||
std::is_pointer<T>::value || std::is_same<T, char8_type>::value ||
|
||||
std::is_same<T, std::basic_string<Char>>::value ||
|
||||
std::is_same<T, std_string_view<Char>>::value ||
|
||||
(std::is_convertible<T, int>::value && !std::is_enum<T>::value)>>
|
||||
: std::false_type {};
|
||||
|
||||
|
@ -294,3 +294,8 @@ struct abstract {
|
||||
void format_abstract_compiles(const abstract& a) {
|
||||
fmt::format(FMT_COMPILE("{}"), a);
|
||||
}
|
||||
|
||||
TEST(ostream_test, is_formattable) {
|
||||
EXPECT_TRUE(fmt::is_formattable<std::string>());
|
||||
EXPECT_TRUE(fmt::is_formattable<fmt::detail::std_string_view<char>>());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user