[xsd-users] expat build fails with 4.0
Ovanes Markarian
om_codesynthesis at keywallet.com
Wed Jul 23 20:29:57 EDT 2014
Hello *,
there seems to be a minor misconception with expat interface. Clang 3.4 on
Mac OS X gives me the error:
/usr/local/include/xsd/cxx/parser/expat/elements.txx:313:17: error: no
matching function for call to 'XML_Parse'
if (XML_Parse (
^~~~~~~~~
/usr/local/include/expat.h:778:1: note: candidate function not viable: no
known conversion from 'parser_auto_ptr' (aka
'unique_ptr<XML_ParserStruct>') to 'XML_Parser' (aka 'XML_ParserStruct *')
for 1st argument
XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);
^
std::unique_ptr does not implicitly converts to the pointer to the value
contained there...
IMO there must be:
if (XML_Parse (
parser.get(), buf, is.gcount (), is.eof ()) ==
XML_STATUS_ERROR)
^^^^^
{
r = false;
break;
}
which fixes the problem. But I'am not sure weather I'am correct about
passing a bare pointer. I think yes, as expat is a C based parser.
Thanks for the new release,
Ovanes
More information about the xsd-users
mailing list