Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b399e775 authored by Andreas Gampe's avatar Andreas Gampe Committed by android-build-merger
Browse files

Merge "Base: Delete ostream<< with std::string*" am: 2dd3b6e3 am: 35fc039a

am: 433a382d

Change-Id: I46dbd5ffdb9692711cacfb5fd5f7a8e897ab3ed7
parents 4213af2b 433a382d
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -438,4 +438,14 @@ class ScopedLogSeverity {
}  // namespace base
}  // namespace base
}  // namespace android
}  // namespace android


namespace std {

// Delete << with string* to avoid mistakes. The intention was most likely to print *string.
// If you really want to print the pointer, consider static_cast<void*>.
//
// Note: for this to work, we need to have this in a namespace.
std::ostream& operator<<(std::ostream& stream, const std::string* string_pointer) = delete;

}  // namespace std

#endif  // ANDROID_BASE_LOGGING_H
#endif  // ANDROID_BASE_LOGGING_H