diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h index 0ebdd60f..3d716ece 100644 --- a/include/fmt/ostream.h +++ b/include/fmt/ostream.h @@ -45,6 +45,8 @@ struct is_streamable< enable_if_t< std::is_arithmetic::value || std::is_array::value || std::is_pointer::value || std::is_same::value || + std::is_same>::value || + std::is_same>::value || (std::is_convertible::value && !std::is_enum::value)>> : std::false_type {}; diff --git a/test/ostream-test.cc b/test/ostream-test.cc index a01182d1..f81039e5 100644 --- a/test/ostream-test.cc +++ b/test/ostream-test.cc @@ -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()); + EXPECT_TRUE(fmt::is_formattable>()); +}