Argument-Dependent Lookup and the Hidden Friend Idiom -- Rainer Grimm
You've got to know where to find them, know how to bind them, know when to ask for help, from a hidden friend...
Argument-Dependent Lookup and the Hidden Friend Idiom
by Rainer Grimm
From the article:
Have you ever wondered why the following program works?
#include <iostream> int main() { std::cout << "Hello world"; }Why should the program not work? The overloaded output operator
operator<<is defined in thestdnamespace. The question is, therefore: How is the appropriate overloaded output operator forstd::stringfound? You may already assume it...

A little less primitive...
Are you a library person (std::function, std::bind, std::bind_front) or a language person (lambdas, auto, currying)? So many tools to get the job done...
A new instant classic for the new year, by the great Phil Nash of C++ on Sea...