Keep Your Friends under control
summary
Placing a free function as an inline friend inside a class makes it hidden from the enclosing namespace so it is only found by ADL, which cuts the huge list of overloads that usually swamp error messages and slow compilation; the talk shows example error output before and after and claims noticeably smaller diagnostic noise and faster compile in practice. Tradeoff: the function must be inline friend, changing linkage/definition habits. A separate independence of declaration proposal suggests a new keyword to get the same effect without making it inline.
AI-written summary · about
related talks
01h 02mFree Your Functions!
01h 02mAdvanced Levelization Techniques (part 2 of 3)
01h 00mAdvanced Levelization Techniques (part 3 of 3)
01h 20mHiding your Implementation Details is Not So Simple
58mA Practical Guide to Loose Coupling
01h 03mHiding Your Implementation Details in C++ is Not So Simple
01h 16mRetiring the Singleton Pattern, Concrete Suggestions for What to Use Instead
01h 01mEasy to Use, Hard to Misuse: Declarative Style in C++
