From d473e4a5ac1218659f30afee0486143ab7e1f134 Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Thu, 10 Sep 2015 13:17:00 +0200 Subject: [PATCH] Bug 1203314 - Make operator<< a method on unused_t. r=froydnj This prevents operator overload resolution from failing when this file is included in a file that uses Chromium IPC logging. --- mfbt/unused.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mfbt/unused.h b/mfbt/unused.h index 79e0536c39f..e9db127c3a5 100644 --- a/mfbt/unused.h +++ b/mfbt/unused.h @@ -19,16 +19,13 @@ namespace mozilla { // struct unused_t { + template + inline void + operator<<(const T& /*unused*/) const {} }; extern MFBT_DATA const unused_t unused; -template -inline void -operator<<(const unused_t& /*unused*/, const T& /*unused*/) -{ -} - } // namespace mozilla #endif // __cplusplus