[xsd-users] VC 9.0 & optional type conversion.

david.r.moss at selex-comms.com david.r.moss at selex-comms.com
Fri Jul 25 08:36:44 EDT 2008


Hi,

Given the following schema:

<?xml version="1.0" encoding="utf-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" >

   <xsd:complexType name="ns1_type">
      <xsd:sequence>
         <xsd:element name="fund_int" type="xsd:int"   minOccurs="0" />
         <xsd:element name="cust_int" type="ns2_int_t" />
      </xsd:sequence>
   </xsd:complexType>

   <xsd:simpleType name="ns2_int_t">
      <xsd:restriction base="xsd:int"/>
   </xsd:simpleType>

</xsd:schema>

The following code complies under VC71 but not VC90:

// Test. vc90 ambiguous function call between 
// optional and non-optional overloads.
ns1_type ns1(0);
ns1.fund_int( ns1.cust_int() );


Any ideas?!

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 Lambda House, Christopher Martin Rd, Basildon, SS14 3EL. England.



More information about the xsd-users mailing list