[omniORB] Sequence of Sequence causes client compiler errors!!!
Bruce Visscher
bvisscher@mindspring.com
Fri, 29 Jan 1999 00:43:42 -0500
David Morgenlender wrote:
> IAE, I still don't understand why this compiles:
>
> Tests::TestResultsList* seqResults;
> INTERFACE_TESTS-> Test(seqResults);
>
> and this does not:
>
> Tests::TestResultsList seqResults;
> INTERFACE_TESTS-> Test(&seqResults);
>
> Clearly, they are very different in terms of execution. But from the
> compilation point of view, in each case the argument is
> "Tests::TestResultsList*". What am I missing?
The difference is that in the second case, you're binding a temporary to a
non-const reference. C++ won't let you do that. In this case for good reason.
You were trying to replace the address of a stack variable with a heap pointer.
Not good at all.
HTH,
Bruce