Merge "String16: operator<<" am: 824418c370

Change-Id: I2ee6e01d1898aa2fec3df5caaa440eef314aeb66
This commit is contained in:
Automerger Merge Worker 2020-02-11 23:03:21 +00:00
commit fddc5b2fb1
1 changed files with 7 additions and 1 deletions

View File

@ -17,7 +17,8 @@
#ifndef ANDROID_STRING16_H
#define ANDROID_STRING16_H
#include <string> // for std::string
#include <iostream>
#include <string>
#include <utils/Errors.h>
#include <utils/String8.h>
@ -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;
}
// ---------------------------------------------------------------------------
/*