diff options
| author | Eric Fiselier <eric@efcs.ca> | 2019-09-25 18:56:54 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2019-09-25 18:56:54 +0000 |
| commit | af4a29af0179995a9d639af45d2c7bacab61f2b0 (patch) | |
| tree | 4004b7362f2faccf8a22fab6223243879144d2db /libcxx/include/string_view | |
| parent | 374c04e25733e2a5e07c8151bb6ead71ceab528f (diff) | |
| download | bcm5719-llvm-af4a29af0179995a9d639af45d2c7bacab61f2b0.tar.gz bcm5719-llvm-af4a29af0179995a9d639af45d2c7bacab61f2b0.zip | |
Add forward declaration of operator<< in <string_view> as required.
This declaration was previously missing despite appearing in the
synopsis. Users are still required to include <ostream> to get the
definition of the streaming operator.
llvm-svn: 372909
Diffstat (limited to 'libcxx/include/string_view')
| -rw-r--r-- | libcxx/include/string_view | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libcxx/include/string_view b/libcxx/include/string_view index 3a30db8b17b..8a684a8f966 100644 --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -173,6 +173,7 @@ namespace std { #include <__config> #include <__string> +#include <iosfwd> #include <algorithm> #include <iterator> #include <limits> @@ -767,6 +768,12 @@ bool operator>=(typename common_type<basic_string_view<_CharT, _Traits> >::type return __lhs.compare(__rhs) >= 0; } + +template<class _CharT, class _Traits> +basic_ostream<_CharT, _Traits>& +operator<<(basic_ostream<_CharT, _Traits>& __os, + basic_string_view<_CharT, _Traits> __str); + typedef basic_string_view<char> string_view; #ifndef _LIBCPP_NO_HAS_CHAR8_T typedef basic_string_view<char8_t> u8string_view; |

