From: Warren Young Date: September 8 2010 9:11pm Subject: Re: mysqlpp::sql_set and mysql_sql_set_null compiler errors List-Archive: http://lists.mysql.com/plusplus/9043 Message-Id: <4C87FBEC.4020900@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 9/8/2010 2:23 PM, Adrian Cornish wrote: > > I cannot compile even a simple example using sets? It's not a very popular part of MySQL++, so you might be the first person to either find this particular bug, or at least care enough about it to report it. > Can someone point > me at the obvious errors I must doing. You failed to patch MySQL++ to support this use case. :) If you look down at the bottom of lib/myset.h, you'll see an absence of a template specialization for mysqlpp::Set. I think adding one will fix your problem. It looks easy to add, but I'd rather you did it, since as far as I know, you're the only client for that code. > I dont understand why its trying to apply conversion. The conversion from const char* is because all data comes from the MySQL server as C strings. The attempt to convert from that to unsigned long is the actual error. I'm pretty sure the compiler is trying that because it's the fall-through case, allowing us to get away without providing explicit conversion paths for all the many integral types, including things like bool.