dbTalk Databases Forums  

[patch] gcc 3.4.x compile patch

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss [patch] gcc 3.4.x compile patch in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris Frey
 
Posts: n/a

Default [patch] gcc 3.4.x compile patch - 03-04-2005 , 12:54 AM






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.



--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: [patch] gcc 3.4.x compile patch - 03-05-2005 , 01:29 AM






Chris Frey wrote:

Quote:
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.
Sorry, I don't know how this was missed. Yes, it's ugly, but I have no
better idea. Accepted.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.