[xsd-users] Compile issue
Boris Kolpackov
boris at codesynthesis.com
Thu Dec 11 03:02:29 EST 2008
Hi Chris,
Chris Gonzales <raptor_cg at yahoo.com> writes:
> "../xsd/cxx/tree/elements.hxx", line 722.24: CCN5296 (S) A return value of type "std::auto_ptr<xsd::cxx::tree::_type::dom_info>"
> cannot be initialized with an rvalue of type "std::auto_ptr<xsd::cxx::tree::_type::dom_info>".
>
> example line for error in question:
> if (cn == 0)
> return auto_ptr<dom_info> (0);
>
> I have been able to find a work around using:
> return std::auto_ptr_ref<dom_info>(auto_ptr<dom_info> (0));
>
A customer reported a similar problem with IBM XL C++ on z/OS. I
believe you are also using this configuration. That customer solved
this by upgrading to a newer version of the C++ compiler.
We can also try to work around this problem in our code. However,
before resorting to using auto_ptr_ref directly, could you try
to change:
return auto_ptr<dom_info> (0);
to
auto_ptr<dom_info> r (0);
return r;
And let me know if this gets rid of the compiler error?
Thank you,
Boris
More information about the xsd-users
mailing list