diff --git a/libutils/include/utils/String16.h b/libutils/include/utils/String16.h index 27eca0c4a..c0e3f1eba 100644 --- a/libutils/include/utils/String16.h +++ b/libutils/include/utils/String16.h @@ -17,7 +17,8 @@ #ifndef ANDROID_STRING16_H #define ANDROID_STRING16_H -#include // for std::string +#include +#include #include #include @@ -195,6 +196,11 @@ public: // require any change to the underlying SharedBuffer contents or reference count. ANDROID_TRIVIAL_MOVE_TRAIT(String16) +static inline std::ostream& operator<<(std::ostream& os, const String16& str) { + os << String8(str).c_str(); + return os; +} + // --------------------------------------------------------------------------- /*