[xsd-users] Moving over to c++11

Paul McGrath paul.s.mcgrath at gmail.com
Fri Mar 24 09:02:49 EDT 2023


Thanks. I was able to get below generated if I DON'T use the
"--generate-element-type" flag. Is this normal behavior? I would like to
use that flag.

// Parse a URI or a local file.
//

::std::unique_ptr< ::MatML_Doc >
MatML_Doc_ (const ::std::string& uri,
            ::xml_schema::flags f = 0,
            const ::xml_schema::properties& p = ::xml_schema::properties
());

On Fri, Mar 24, 2023 at 4:45 AM Boris Kolpackov <boris at codesynthesis.com>
wrote:

> Paul McGrath <paul.s.mcgrath at gmail.com> writes:
>
> > it looks as though the equivalent c++11 function of the old function
> > (below) does not exist.
> >
> > ::std::auto_ptr< ::MatML_Doc >
> > MatML_Doc_ (const ::std::string& uri,
> >             ::xml_schema::flags f = 0,
> >             const ::xml_schema::properties& p = ::xml_schema::properties
> ());
>
> In C++11 and later the parsing functions are changed to return
> std::unique_ptr instead of (deprecated) std::auto_ptr:
>
> ::std::unique_ptr< ::MatML_Doc >
> MatML_Doc_ (const ::std::string& uri,
>             ::xml_schema::flags f = 0,
>             const ::xml_schema::properties& p = ::xml_schema::properties
> ());
>
>


More information about the xsd-users mailing list