diff options
Diffstat (limited to 'include/utils/String8.h')
-rw-r--r-- | include/utils/String8.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/utils/String8.h b/include/utils/String8.h index 4163697..335e7f1 100644 --- a/include/utils/String8.h +++ b/include/utils/String8.h @@ -20,6 +20,7 @@ #include <utils/Errors.h> #include <utils/SharedBuffer.h> #include <utils/Unicode.h> +#include <utils/TypeHelpers.h> #include <string.h> // for strcmp #include <stdarg.h> @@ -219,6 +220,10 @@ private: const char* mString; }; +// String8 can be trivially moved using memcpy() because moving does not +// require any change to the underlying SharedBuffer contents or reference count. +ANDROID_TRIVIAL_MOVE_TRAIT(String8) + TextOutput& operator<<(TextOutput& to, const String16& val); // --------------------------------------------------------------------------- |