Skip to content

Glossary: Software Design Patterns in C++

Service locator

A global registry that code reaches into to find its dependencies, like `*REGISTRY.at("repo")`. It hides dependencies again, and tests must change a global.

Where the book teaches it

Related terms

Dependency injectionGlobal state