[omniORB] Problem inserting an array of structs containing strings into an any

Duncan Grisby duncan at grisby.org
Mon Jan 9 15:48:47 GMT 2006


On Friday 6 January, Brian Neal wrote:

> Test::TestStructArray_forany fa;
> if (a >>= fa) {
>    std::copy(&fa[0UL], &fa[0UL] + numElems,
>                   std::ostream_iterator<Test::TestStruct>(std::cout, "\n"));
> }
> 
> Notice the 0UL. If I don't, and use plain old int 0 to index into the
> forany, g++ 3.4.4 gives me the following error:
> 
> main.cpp:46: error: ISO C++ says that these are ambiguous, even though
> the worst conversion for the first is better than the worst conversion
> for the second:

I don't know why gcc thinks it's ambiguous, but I've added the operators
for int as for the fixed length struct case.

Cheers,

Duncan.

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



More information about the omniORB-list mailing list