On Apr 30, 2010, at 12:54 AM, Andrej van der Zee wrote:
> Thank you for your reply. That I tried but get the following (I am using 3.08):
>
> /usr/local/include/mysql++/null.h: In member function ‘void
> parsers::ip::dbdump()’:
> /usr/local/include/mysql++/null.h:55: error: ‘mysqlpp::null_type::operator
> CannotConvertNullToAnyOtherDataType() const [with CannotConvertNullToAnyOtherDataType =
> unsigned int]’ is protected
Ah, static typing. Gotta love it. You'll have to do it with if/else instead of the
alternation operator:
if (h)
db_host_id = h->_db_host_id;
else
db_host_id = mysqlpp::null;
That's *somewhat* cleaner than your current code.