3 ms·
> I wrote a second timer, which had hooks my unit test system could use to advance time without having to inject timers. This use case isn't an ODR violation.
by brandmeyer 5y ago
> I wrote a second timer, which had hooks my unit test system could use to advance time without having to inject timers.
This use case isn't an ODR violation. Its just using the linker to mock an interface.
> It will fail at link time if you link everything into the same library.
That is an ODR violation, although there are variations on this pattern that are not required to be detectable. Template instantiation is an easy way to get a silent ODR violation.