Dave, thanks for your reply.
I checked in Token.hpp and this is an unnamed-enum within the Token { }
namespace.
Having said that, the problem is not with xerces headers - they are
fine.
The problem arises due to headers from one of our internal component
wherein a match for the == and =! operator functions is available
causing the error/conflict.
For now, I have modified the code in the RegularExpression.hpp to
explicitly typecast as (const unsigned short) so that there is no
conflict.
Thank you.
Ramkumar Devanathan
HP Software BTO R&D
Bangalore
India
PHONE: (91)-80-2205-2219
-----Original Message-----
From: David Bertoni [mailto:[EMAIL PROTECTED]
Sent: Monday, June 04, 2007 12:53 AM
To: [email protected]
Subject: Re: Problem - RegularExpression.hpp - Xerces 2.7
Devanathan, Ramkumar (HP Software BTO) wrote:
> Compiler - AIX xlc_r (version 5).
> Xerces 2.7
>
> Error Message:
> ".../include/xercesc/util/regx/RegularExpression.hpp", line 400.19:
> 1540-0219 (S) The call to "operator!=" has no best match.
> ".../include/xercesc/util/regx/RegularExpression.hpp", line 400.11:
> 1540-1228 (I) Argument number 1 is an lvalue of type "const unsigned
> short".
> ".../include/xercesc/util/regx/RegularExpression.hpp", line 400.22:
> 1540-1229 (I) Argument number 2 is an rvalue of type "<unnamed-enum>".
> ".../include/xercesc/util/regx/RegularExpression.hpp", line 400.19:
> 1540-1202 (I) No candidate is better than "builtin operator!=(int,
> int)".
> ".../include/xercesc/util/regx/RegularExpression.hpp", line 400.11:
> 1540-1231 (I) The conversion from argument number 1 to "int" uses an
> lvalue-to-rvalue transformation followed by an integral promotion.
> ".../include/xercesc/util/regx/RegularExpression.hpp", line 400.22:
> 1540-1231 (I) The conversion from argument number 2 to "int" uses an
> integral promotion.
I find it interesting that the compiler is referring to an
"<unnamed-enum>".
>
> This is the offending line -
> ....
> inline Op* RegularExpression::compileSingle(const Token* const
token,
> Op* const next,
> const unsigned short
> tokType) {
>
> ...
> if (tokType != Token::T_EMPTY) <-- compiler error here
> ret->setNextOp(next);
>
> ....
> <<
>
> Apparently implicit conversion between const unsigned short and enum
> type will not work, although this is just with AIX.
>
> Funnily when i build xerces libraries, i don't get this compiler
error.
What happens if you include the file "xercesc/util/regx/Token.hpp"? The
problem may be that the enum is not known, and the Xerces library code
includes that header file by chance.
Dave