Commit 40ede06e by Matt Kulukundis Committed by Copybara-Service

Improve the comments on the implementation of format hooks adl tricks.

PiperOrigin-RevId: 477811281
Change-Id: Iba838e0eaceb5e6bfe1dac496fc86a22f5cf31d5
parent f8b5a041
......@@ -60,7 +60,12 @@ struct HasUserDefinedConvert<T, void_t<decltype(AbslFormatConvert(
std::declval<FormatSink*>()))>>
: std::true_type {};
void AbslFormatConvert(); // Stops the lexical name lookup
// These declarations prevent ADL lookup from continuing in absl namespaces,
// we are deliberately using these as ADL hooks and want them to consider
// non-absl namespaces only.
void AbslFormatConvert();
void AbslStringify();
template <typename T>
auto FormatConvertImpl(const T& v, FormatConversionSpecImpl conv,
FormatSinkImpl* sink)
......@@ -76,7 +81,6 @@ auto FormatConvertImpl(const T& v, FormatConversionSpecImpl conv,
return AbslFormatConvert(v, fcs, &fs);
}
void AbslStringify(); // Stops the lexical name lookup
template <typename T>
auto FormatConvertImpl(const T& v, FormatConversionSpecImpl,
FormatSinkImpl* sink)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment