Author: wyoung
Date: Tue Feb 12 06:34:36 2008
New Revision: 2187
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2187&view=rev
Log:
Fixed a bug where an empty Set couldn't be inserted into a stream
Modified:
trunk/lib/myset.h
Modified: trunk/lib/myset.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/myset.h?rev=2187&r1=2186&r2=2187&view=diff
==============================================================================
--- trunk/lib/myset.h (original)
+++ trunk/lib/myset.h Tue Feb 12 06:34:36 2008
@@ -99,12 +99,14 @@
typename Container::const_iterator i = Container::begin();
typename Container::const_iterator e = Container::end();
- while (true) {
- s << *i;
- if (++i == e) {
- break;
+ if (i != e) {
+ while (true) {
+ s << *i;
+ if (++i == e) {
+ break;
+ }
+ s << ",";
}
- s << ",";
}
return s;
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits