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

Boris Kolpackov boris at codesynthesis.com
Fri Jul 25 10:10:07 EDT 2008


Hi David,

david.r.moss at selex-comms.com <david.r.moss at selex-comms.com> writes:

> 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() );

This is apparently caused by the following two implicit conversion
operators that are defined in the fundamental_base class template
(libxsd/xsd/cxx/tree/elements.hxx:1235):

template <typename Y>
operator Y () const
{
  return x_;
}

template <typename Y>
operator Y ()
{
  return x_;
}

They were disabled for 7.1 because they cause ICE to this compiler.
Since they are rarely used we have disabled them by default in the
next release. You can also comment them out in your copy of XSD as
a work around.

Thanks for reporting this!

Boris




More information about the xsd-users mailing list