Hiya,
Ouch, sorry for the slow response.
The best way to do this is to use the PointerValue and make sure that your object doesn't go out of scope.
So, it would be something:
mock("MyList").expectOneCall("getList").andReturnValue(&stringList);
Then, you do getPointerValue in the function and cast it to a stringList pointer.
Hope that helps?
Thanks,
Bas
ps. It works this way because we chose to stay away from templates in CppUTest...