[omniORB] Re: Mapping problem?

Gary D. Duzan gdd0@gte.com
Mon, 23 Nov 1998 12:51:23 -0500


In Message <Pine.LNX.3.96.981123141158.29435A-100000@honister.cam-orl.co.uk> ,
   David Riddoch <djr@orl.co.uk> wrote:

=>Gary,
=>
=>You are correct that attempting to widen one _var type to a base _var type
=>must generate a compiler error. In fact on most compilers (and certainly
=>on SUN and egcs) it does.

   Drat. I had tested that and thought that it was failing properly for
_var widening and only succeeding improperly when widening a _var into
a member, but I must have done it wrong, since both cases now succeed
improperly, and examining the templates I can't see why the two cases
would be different. (The members of the two templates are ordered
differently, which may have confused me before.)
   So it is an xlC-specific problem.

=>Your suggestion for changing the signature of the member assignment
=>operator also has a problem - it would require the compiler to create a
=>temporary variable for the argument under certain circumstances. This is
=>contrary to the c++ spec.

   Right. I had thought of that, and I didn't really like the
suggestion, myself.
   On the theory that the behavior should be explicitly specified for
assigning _vars to members, I have submitted an issue to the OMG on it
so that the C++ RTF can comment on it in a future language mapping
revision.

					Gary Duzan
					GTE Laboratories