You do not say what errors you get. I don't think Google Mock should
have any problems with this. I am wildly guessing that you may get
errors because "Object" is only forward-declared or something.
--
/Martin
In C/C++, you need a complete definition to copy an object to pass it as
a parameter by value.
A parameter by pointer or by reference does not need a completely
defined, because only the pointer/reference is copied.
You should keep using a const-reference.
/Martin
--
/Martin
The _parameter_ should be const-reference, but the _return_ should be
by-value.
Then you need a complete definition after all.
I don't really know anything about PrintTo...
/Martin
--
/Martin