Sorry for the delay...the weekend got my attention:)
I wanted to keep the first post simple, so I purposely left the rest of the compile error
out.
Here's the full output from the compile.
"ambiguous overload for
'const mysqlpp:ColData == mysqlpp::Null<int, mysqlpp::NullIsZero>&'
operator"
candidates are: operator==(int, int) <built-in>
operator==(double, int) <built-in>
operator==(float, int) <built-in>
operator==(ulonglong, int)<built-in>
operator==(longlong, int)<built-in>
operator==(long unsigned int, int)<built-in>
operator==(long int, int)<built-in>
operator==(unsigned int, int)<built-in>
Error code 1
I should add the reason why I want to have this sort of code is that I want to
distinguish between a stored NULL entry in the DB and a bad conversion when assigning a
value obtained from the DB. So the code snippet I gave is in my "BadConversion" catch
block. Is there a better way of doing this?
HTH...steve---
-----Original Message-----
From: Warren Young [mailto:mysqlpp@stripped]
Sent: Fri 4/7/2006 5:39 PM
To: MySQL++ Mailing List
Subject: Re: NULL field comparison
Orton, Steve wrote:
> Which produces the following compile error:
>
> "ambiguous overload for
> 'const mysqlpp:ColData == mysqlpp::Null<int, mysqlpp::NullIsZero>&'
> operator"
Did the compiler not tell you what the alternatives were that it was
forced to choose from? That would help me to understand where the
ambiguity is. As far as I can see, there's only one conversion path:
there's a template operator Null<T, B> in coldata.h which should be able
to convert ColData objects to Null-wrapped ColData objects.
One sticky point I see is that there is no operator== for the Null
template. Maybe the compiler wants to see one?
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsub=1