|
|||||||||||
|
Bug: char[]s not escaped
From: Andrew Sayers <andrew-mysqlpp(at)pileofstuff.org>
Date: Sun Jul 01 2007 - 20:55:35 EDT
#include <mysql++.h>
using namespace std;
int main() { string s1 = "Frank's Brand Hotdog Buns"; std::cout << quote << s1 << std::endl; // Output: 'Frank\'s Brand Hotdog Buns' char s2[] = "Frank's Brand Hotdog Buns"; std::cout << quote << s2 << std::endl; // Output: Frank's Brand Hotdog Buns } C++ prefers to use the template functions rather than converting a char[] to a char*. Here's a patch:
+inline std::ostream& operator <<(quote_type1 o,
template <>
return operator <<(o, const_cast<const char* const&>(in)); } +inline std::ostream& operator <<(escape_type1 o,
/// \enum do_nothing_type0
-- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=lists@pantek.comReceived on Sun Jul 1 20:56:05 2007 This archive was generated by hypermail 2.1.8 : Sun Jul 01 2007 - 21:00:04 EDT |
||||||||||
|
|||||||||||