From: Warren Young Date: April 17 2007 1:16am Subject: Re: NULL in templatized queries List-Archive: http://lists.mysql.com/plusplus/6532 Message-Id: <46241FEE.80509@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Michael Hanselmann wrote: > > A clean solution isn't possible without breaking compatibility; Just adding new functions shouldn't break anything. > +SQLString::SQLString(const SQLNullStringTag& value) : I don't see a need to invent a new type. I think you can get the behavior you want by adding a conversion ctor to SQLString that takes a mysqlpp::null_type. That ctor just evaluates to "NULL", ignoring the passed parameter's actual value. To get a null template parameter, you simply pass mysqlpp::null. Is that not sufficient?