“Test Base Class Injection” is a technique that uses C++’s name resolution rules to replace a dependency at compile-time with your own test double/fake/mock.
https://github.com/MiddleRaster/tbci
It works on data-members, arguments, return types, C calls, etc. One use case is mocking a type that is an automatic variable in a static method or constructor, where subclass-and-override doesn’t work.
[link] [comments]









![The Gang Republic: Inside Haiti’s New Order (2026) - ~3 million people living in the grips of all-out gang war. France24 spent a fortnight filming in and around the Haitian capital, speaking to a population held hostage by this drawn-out crisis (CC) [00:52:38]](https://external-preview.redd.it/0j1B98qWy2MAsjLEwjT10EbknBToMVuWRJ-tUeZsTso.jpeg?width=320&crop=smart&auto=webp&s=041d55dee546ef807e7eda2e0d1d013111f02a25)

English (US) ·