[omniORB] Help needed: operator <<= is ambiguous

Gary D. Duzan gdd0@gte.com
Thu, 03 Dec 1998 09:10:35 -0500


Your problem appears to be that OmniORB has (paraphrasing):

   void Any::operator<<=(const char*& s);

when it should probably be:

   void Any::operator<<=(const char*& s);

All the versions of the spec from 2.0 to the latest RTF draft
state (roughly) that this should be the case. As a workaround,
try:

   const char *tmp = aString.data();
   aField.mValue <<= tmp;

and see if that clears things up.

					Gary Duzan
					GTE Laboratories



In Message <36665E7B.7700D03F@roma1.infn.it> ,
   Giovanni Organtini <Giovanni.Organtini@roma1.infn.it> wrote:

=>Hi,
=>I'm working on a High Energy Physics project named CRISTAL. We are
=>considering omniORB as one of the possible solutions for our ORB (we
=>used Orbix until now, bue we would like to support linux, that's not
=>supported by Orbix). I tried to compile our applications using omniORB
=>and Visual C++ 5.0, but I got errors. Those errors was not given when I
=>was using Orbix. I have a structure made more or less as follows:
=>
=>struct GField {
=>     ...
=>     string mName;
=>     string mType;
=>     any mValue;
=>}
=>
=>and in the code there are lines such as aField.mValue <<= something. The
=><<= operator works well for every type but for variables of type string
=>whose characters are extracted using the data() method:
=>
=>aField.mValue <<= (const char *)aString.data();
=>
=>I tried converting it into a string type, char *, and other similar
=>variants, but I did not succeded. The error I get during compilation is
=>that the operator <<= is ambiguous.
=>
=>Does anyone has a solution for that? Thank you.
=>
=>Giovanni
=>