Daily bit(e) of C++ | Customization point using ADL
Daily bit(e) of C++ #223, Implementing a customization point using ADL and C++20 concepts.
One of the possibilities to introduce a customization point in a library is through ADL (Argument Dependent Lookup). With C++20 concepts, this approach got much cleaner.
A Niebloid combined with a concept that detects the presence of custom implementation can handle the fallback to default implementation without the need to fiddle with namespaces on the calling site.