List:MySQL++« Previous MessageNext Message »
From:Edward Diener Date:January 28 2009 8:20pm
Subject:SSQLS structure problem with sql_tinyint_unsigned and mysqlpp::Null
View as plain text  
If I attempt to create an SSQLS struct like:

sql_create_2
(
ATable,
2,0,
mysqlpp::Null<mysqlpp::sql_text>,aa,
mysqlpp::Null<mysqlpp::sql_tinyint_unsigned>,bb
)

I will get an error using this in VC9, with the message:

e:\utilities\mysql++-3.0.4\lib\null.h(268) : error C2593: 'operator ==' 
is ambiguous
        could be 'built-in C++ operator==(bool, bool)'
        or       'built-in C++ operator==(bool, int)'
        or       'built-in C++ operator==(bool, unsigned char)'
        or       'built-in C++ operator==(int, bool)'
        or       'built-in C++ operator==(int, int)'
        or       'built-in C++ operator==(int, unsigned char)'
        or       'built-in C++ operator==(unsigned char, bool)'
        or       'built-in C++ operator==(unsigned char, int)'
        or       'built-in C++ operator==(unsigned char, unsigned char)'
        while trying to match the argument list '(const 
mysqlpp::sql_tinyint_unsigned, const mysqlpp::sql_tinyint_unsigned)'
        e:\utilities\mysql++-3.0.4\lib\null.h(260) : while compiling 
class template member function 'bool mysqlpp::Null<Type>::operator 
==(const mysqlpp::Null<Type> &) const'
        with
        [
            Type=mysqlpp::sql_tinyint_unsigned
        ]

If I change the SSQLS struct to:

sql_create_2
(
ATable,
1,0,
mysqlpp::Null<mysqlpp::sql_text>,aa,
mysqlpp::Null<mysqlpp::sql_tinyint_unsigned>,bb
)

there is no error. However both fields are do really allow NULL and 
should be compared to determine equality. Is there a better way to fix 
this problem ?


Thread
SSQLS structure problem with sql_tinyint_unsigned and mysqlpp::NullEdward Diener28 Jan
  • Re: SSQLS structure problem with sql_tinyint_unsigned and mysqlpp::NullWarren Young28 Jan
Re: SSQLS structure problem with sql_tinyint_unsigned and mysqlpp::NullEdward Diener29 Jan
  • Re: SSQLS structure problem with sql_tinyint_unsigned and mysqlpp::NullWarren Young29 Jan
    • Re: SSQLS structure problem with sql_tinyint_unsigned and mysqlpp::NullWarren Young3 Feb