List:MySQL++« Previous MessageNext Message »
From:Chris Frey Date:March 4 2005 6:52am
Subject:[patch] gcc 3.4.x compile patch
View as plain text  
Hi there,

This patch was in the last set, but it was no in version 1.7.30, so either
it was dropped due to sheer ugliness (which I would understand) :-)  or
it was just overlooked.

This does make a compilation difference in pedantic mode on gcc 3.4.x,
at least with my tests, so it's not just a nicety fix.

I've seen the "this->" construction used in other inline code as well
(not just in mysql++) so I'm partly wondering if it's a C++ thing I
don't understand, or just a gcc bug.

Accept or trash at will,
- Chris


diff -u software/mysql++/lib/compare.h:1.5 software/mysql++/lib/compare.h:1.6
--- software/mysql++/lib/compare.h:1.5	Thu Mar  3 23:44:20 2005
+++ software/mysql++/lib/compare.h	Fri Mar  4 01:39:10 2005
@@ -27,7 +27,7 @@
   MysqlCmpCStr(uint i, const BinaryPred &f, const char* c) : MysqlCmp<BinaryPred,
const char *> (i,f,c) {}
   bool operator () (const Row& cmp1) const 
     {return MysqlCmp<BinaryPred, const char*>::func(
-			MysqlCmp<BinaryPred, const char*>::cmp2, cmp1[index]);}
+			MysqlCmp<BinaryPred, const char*>::cmp2, cmp1[this->index]);}
 };
 
 //: A special function for using in find_if function where i is the field index number.


Thread
[patch] gcc 3.4.x compile patchChris Frey4 Mar
  • Re: [patch] gcc 3.4.x compile patchWarren Young5 Mar