6 messages in com.mysql.lists.plusplusminor compile-time issue with mysqlpp...
FromSent OnAttachments
Andrej van der Zee14 Feb 2008 18:18 
Warren Young14 Feb 2008 22:33 
Andrej van der Zee14 Feb 2008 23:37 
Warren Young15 Feb 2008 09:16 
Andrej van der Zee16 Feb 2008 17:28 
Warren Young19 Feb 2008 03:21 
Subject:minor compile-time issue with mysqlpp::null
From:Andrej van der Zee (mavd@yahoo.co.uk)
Date:02/14/2008 06:18:34 PM
List:com.mysql.lists.plusplus

First of all, thanks for this release (candidate)! I expected more effort for upgrading my project to mysqlpp 3.0, but it was done without pain in a few hours!

I found a minor compile-time issue. The following construct:

unsigned msr_id = ...; // some value volume vol(1, 1, msr_id ? msr_id : mysqlpp::null, 1, "dummy");

Where volume is the SSQLS struct:

sql_create_complete_5(volume, 1, 5, mysqlpp::sql_bigint_unsigned, _volume_id, "volume_id", mysqlpp::sql_smallint_unsigned, _session_id, "session_id", mysqlpp::Null<mysqlpp::sql_int_unsigned>, _msr_id, "msr_id", mysqlpp::Null<mysqlpp::sql_bigint_unsigned>, _report_id, "report_id", mysqlpp::sql_varchar, _name, "name" );

Gives me the following compile-time error:

error: passing ‘const mysqlpp::null_type’ as ‘this’ argument of ‘mysqlpp::null_type::operator Type() [with Type = unsigned int]’ discards qualifiers

Note that the following construct works perfectly fine:

volume vol(volume_id, session_id, mysqlpp::null, report_id, name);

Greets, Andrej