[xsd-users] Feature request: Explicit constructors
Benjamin Schindler
bschindler at inf.ethz.ch
Fri Nov 19 10:05:08 EST 2010
On 11/19/2010 03:53 PM, Boris Kolpackov wrote:
> Hi Benjamin,
>
> Benjamin Schindler <bschindler at inf.ethz.ch> writes:
>
>> There are a few problems here:
>> - the implicit conversion from const char* to std::string is required by
>> the standard (I thought) and natural because you're basically converting
>> a string to a string
>
> Correct.
>
>
<snip>
> This will never work, regardless of what we do in XSD. In fact,
> the above example doesn't involve any XSD-genearted or your own
> types so I don't quite see how this demonstrates that adding the
> third c-tor overload to MyClass does not work. Can you elaborate
> a bit here?
Ray proposed to change my constructor to const char*:
"I would resolve the ambiguity by adding a constructor to MyClass:
MyClass(char const*, double)"
And I showed that this introduces new problems as I cannot pass
std::string's anymore to the constructor
Cheers
Benjamin
>
> Boris
More information about the xsd-users
mailing list