[omniORB] Problem passing an array of structs

Duncan Grisby duncan at grisby.org
Sat May 19 17:39:32 BST 2007


On Friday 18 May, W T Meyer wrote:

> Since no one else responded, I'll answer my own question.  I know how
> to get around the problem, but I don't understand why it is a problem.
> 
> Apparently operator[] is overloaded in omniORB only for unsigned int.
> When I changed the index variable i in line 90 from "int i" to
> "unsigned int i" everything worked. The error message is somewhat less
> than transparent in pointing to the problem.
> 
> Is there a reason for requiring unsigned ints?  If so, is there a way
> to give the hapless user a more helpful error message?

The C++ mapping specifies that operator[] should be defined just for
CORBA::ULong (see page 1-49 of the C++ 1.1 mapping).

The "error" is actually just a warning, and I don't think there's
anything omniORB can do to make it clearer -- it's the C++ compiler that
chooses its warning messages.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list