diff options
Diffstat (limited to 'libcxx/include')
| -rw-r--r-- | libcxx/include/ostream | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libcxx/include/ostream b/libcxx/include/ostream index 5404e0dca6c..c29157077b4 100644 --- a/libcxx/include/ostream +++ b/libcxx/include/ostream @@ -56,6 +56,7 @@ public: basic_ostream& operator<<(double f); basic_ostream& operator<<(long double f); basic_ostream& operator<<(const void* p); + basic_ostream<charT, traits>& operator<<(nullptr_t); // C++17 basic_ostream& operator<<(basic_streambuf<char_type,traits>* sb); // 27.7.2.7 Unformatted output: @@ -216,6 +217,7 @@ public: basic_ostream& operator<<(double __f); basic_ostream& operator<<(long double __f); basic_ostream& operator<<(const void* __p); + basic_ostream& operator<<(nullptr_t); basic_ostream& operator<<(basic_streambuf<char_type, traits_type>* __sb); // 27.7.2.7 Unformatted output: @@ -709,6 +711,14 @@ basic_ostream<_CharT, _Traits>::operator<<(const void* __n) return *this; } +template <class _CharT, class _Traits> +basic_ostream<_CharT, _Traits>& +basic_ostream<_CharT, _Traits>::operator<<(nullptr_t) +{ + return *this << "(nullptr)"; +} + + template<class _CharT, class _Traits> basic_ostream<_CharT, _Traits>& __put_character_sequence(basic_ostream<_CharT, _Traits>& __os, @@ -742,7 +752,6 @@ __put_character_sequence(basic_ostream<_CharT, _Traits>& __os, return __os; } - template<class _CharT, class _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c) |

