Make ostream operators opt in to reduce the risk of ODR violations

This commit is contained in:
Victor Zverovich
2022-02-04 15:06:45 -08:00
parent 8a21e328b8
commit f055ebbd25
5 changed files with 35 additions and 43 deletions
+4
View File
@@ -1016,7 +1016,11 @@ struct fallback_formatter {
// Specifies if T has an enabled fallback_formatter specialization.
template <typename T, typename Char>
using has_fallback_formatter =
#ifdef FMT_DEPRECATED_OSTREAM
std::is_constructible<fallback_formatter<T, Char>>;
#else
std::false_type;
#endif
struct view {};