Mike
I doubt this is possible. Even if it is, it's not a good idea as it
seems to be. If what you described is implemented, the behavior of
the mock will depends on the order of #includes. If the header
defining your type is #included before the mock class, you'll see the
value printed correctly. Otherwise you'll see "incomplete type".
This inconsistency itself may not be too bad, until you think about
what happens if you link two .cpp files together. If the #include
orders are different in the two files, you violate C++'s dreaded
One-Definition Rule. The result, is Undefined Behavior. All hell can
break loose.
My suggestion is to just #include the necessary headers for your mock
class definition.
--
Zhanyong