Chromium Code Reviews| Index: base/logging.h |
| diff --git a/base/logging.h b/base/logging.h |
| index bc97ae156a6dc9d8f294a3b420c8e0f0bea782f8..246b19777d496c851c129baa84c365ff232483f5 100644 |
| --- a/base/logging.h |
| +++ b/base/logging.h |
| @@ -827,6 +827,15 @@ BASE_EXPORT std::wstring GetLogFileFullPath(); |
| } // namespace logging |
| +// Note that "The behavior of a C++ program is undefined if it adds declarations |
| +// or definitions to namespace std or to a namespace within namespace std unless |
| +// otherwise specified." --C++11[namespace.std] |
| +// |
| +// We've checked that this particular definition has the intended behavior on |
| +// our implementations, but it's prone to breaking in the future, and please |
| +// don't imitate this in your own definitions without checking with some |
| +// standard library experts. |
| +namespace std { |
| // These functions are provided as a convenience for logging, which is where we |
| // use streams (it is against Google style to use streams in other places). It |
| // is designed to allow you to emit non-ASCII Unicode strings to the log file, |
| @@ -837,6 +846,7 @@ BASE_EXPORT std::ostream& operator<<(std::ostream& out, const wchar_t* wstr); |
| inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) { |
| return out << wstr.c_str(); |
| } |
| +} |
|
awong
2014/07/08 00:33:41
nit:
} // namespace std
|
| // The NOTIMPLEMENTED() macro annotates codepaths which have |
| // not been implemented yet. |