[xsd-users] Ambiguous ostream operator

david.r.moss at selex-comms.com david.r.moss at selex-comms.com
Mon Jun 18 09:11:24 EDT 2007


All,

using xsd-3.0.0.b1-i686-windows and compiling the attached schema with

 

xsd cxx-tree --generate-serialization empty-list-test.xsd

i get the 'error C2593: 'operator <<' is ambiguous' error with the 
following code:

auto_ptr<class root_t> db( root( "empty-list-test.xml" ) );
test_list_t& l = db->test_list();

//         cout << "list:" << l << "." << endl;   // FIXME: ambiguous << 
operator (list, simple type or type)

if( !l.empty() )  // never empty with v2.3.1!
{
   cout << "\tfirst item:" << *(l.begin()) << "." << endl;
}

any ideas?!

I discovered this while trying to figure out why an empty list read from 
file (see attached xml) resulted in an object containing one 
(garbage-looking) item - i was using xsd version 2.3.1 at the time; that 
bug seems to have been fixed in 3.0.0.b1!

Cheers,
Dave.

Dave Moss 
SELEX Communications 
Grange Road 
Christchurch 
Dorset  BH23 4JE 
United Kingdom 
Tel: + 44 (0) 1202 404841 
Email: david.r.moss at selex-comms.com 


------------------------------------------------------------
This email and any attached files contains company confidential information which may be legally privileged. It is intended only for the person(s) or entity to which it is addressed and solely for the purposes set forth therein.  If you are not the intended recipient or have received this email in error please notify the sender by return, delete it from your system and destroy any local copies.  It is strictly forbidden to use the information in this email including any attachment or part thereof including copying, disclosing, distributing, amending or using for any other purpose.

In addition the sender excludes all liabilities (whether tortious or common law) for damage or breach arising or related to this email including but not limited to viruses and libel.
SELEX Communications Limited is a Private Limited Company registered in England and Wales under Company Number 964533 and whose Registered Office is Marconi House, New Street, CHELMSFORD, Essex. CM1 1PL. England.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: empty-list-test.xsd
Type: application/octet-stream
Size: 396 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070618/b95a0441/empty-list-test.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: empty-list-test.xml
Type: application/octet-stream
Size: 182 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070618/b95a0441/empty-list-test-0001.obj


More information about the xsd-users mailing list