1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 **********************************************************************
5 * Copyright (C) 2001-2014 International Business Machines
6 * Corporation and others. All Rights Reserved.
7 **********************************************************************
8 * FILE NAME : ustream.h
10 * Modification History:
12 * Date Name Description
13 * 06/25/2001 grhoten Move iostream from unistr.h
14 ******************************************************************************
20 #include "unicode/unistr.h"
22 #if !UCONFIG_NO_CONVERSION // not available without conversion
26 * \brief C++ API: Unicode iostream like API
28 * At this time, this API is very limited. It contains
29 * operator<< and operator>> for UnicodeString manipulation with the
33 #if !defined(_MSC_VER)
34 namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364
37 #if U_IOSTREAM_SOURCE >= 199711
48 * Write the contents of a UnicodeString to a C++ ostream. This functions writes
49 * the characters in a UnicodeString to an ostream. The UChars in the
50 * UnicodeString are converted to the char based ostream with the default
54 U_IO_API std::ostream & U_EXPORT2 operator<<(std::ostream& stream, const UnicodeString& s);
57 * Write the contents from a C++ istream to a UnicodeString. The UChars in the
58 * UnicodeString are converted from the char based istream with the default
62 U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeString& s);
67 /* No operator for UChar because it can conflict with wchar_t */