List:MySQL++« Previous MessageNext Message »
From:Andrej van der Zee Date:February 15 2008 2:18am
Subject:minor compile-time issue with mysqlpp::null
View as plain text  
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







      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com

Thread
minor compile-time issue with mysqlpp::nullAndrej van der Zee15 Feb
  • Re: minor compile-time issue with mysqlpp::nullWarren Young15 Feb
    • Re: minor compile-time issue with mysqlpp::nullAndrej van der Zee15 Feb
      • Re: minor compile-time issue with mysqlpp::nullWarren Young15 Feb
        • Re: minor compile-time issue with mysqlpp::nullAndrej van der Zee17 Feb
          • Re: minor compile-time issue with mysqlpp::nullWarren Young19 Feb