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
Commit-Queue: Daniel Bratell <>
Auto-Submit: Daniel Bratell <>
Reviewed-by: Daniel Cheng <>
Cr-Commit-Position: refs/heads/master@{#661645}
1 file changed