Disable integral operator<< (#1316)

This commit is contained in:
Victor Zverovich
2019-09-23 20:34:08 -07:00
parent 20fdb88a1c
commit ccc8f5db02
2 changed files with 7 additions and 2 deletions

View File

@@ -49,6 +49,10 @@ template <typename Char> struct test_stream : std::basic_ostream<Char> {
// Hide all operator<< from std::basic_ostream<Char>.
void_t<> operator<<(null<>);
void_t<> operator<<(const Char*);
template <typename T, FMT_ENABLE_IF(std::is_convertible<T, int>::value &&
!std::is_enum<T>::value)>
void_t<> operator<<(T);
};
// Checks if T has a user-defined operator<< (e.g. not a member of