How to mock templated methods using Google Mock?
In previous version of Google Mock you can only mock virtual functions, see the documentation in the project’s page. More recent versions allowed to mock non-virtual methods, using what they call hi-perf dependency injection. As user @congusbongus states in the comment below this answer: Google Mock relies on adding member variables to support method mocking, … Read more