commit | b50da8773d938b8540355f0a05d511b4d370db0d | [log] [tgz] |
---|---|---|
author | Daniel Bratell <bratell@opera.com> | Tue May 21 07:13:52 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Tue May 21 07:13:52 2019 |
tree | 9b0ece4266702591121b9f2e5fb3ebd14c784450 | |
parent | a677807f67cd263637166565a5362beb6284321e [diff] |
Move operator<< for base::ThreadLocalBoolean to namespace base ADL only works properly if functions that depend on ADL are defined in the same namespace as the argument type. The operator<< function for ::base::ThreadLocalBoolean was in the namespace ::base::{anonymous} which prevented ADL from finding the function. Instead it was found through the normal scope lookup as long as there was no other operator<< in base::internal. In jumbo builds the translation unit included base/safe_conversions.h which has an ::base::internal::operator<< and suddenly nothing could find the real operator<< for ThreadLocalBoolean. Thanks to Slack #cxx for explaining all the gory details about function/operator lookup. Bug: 965038 Change-Id: I1d8303eec24996f742ca3362e79f65e83bf53384 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1619904 Commit-Queue: Daniel Bratell <bratell@opera.com> Auto-Submit: Daniel Bratell <bratell@opera.com> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#661645}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .