Re: C++ keywords in headers (was Re: [GENERAL] #include <funcapi.h>)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Magnus Hagander <magnus@hagander.net>
Cc: Andrew Dunstan <andrew@dunslane.net>, Alvaro Herrera <alvherre@commandprompt.com>, Peter Eisentraut <peter_e@gmx.net>, Craig Ringer <craig@postnewspapers.com.au>, Elliot Chance <elliotchance@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2010-12-27T18:21:37Z
Lists: pgsql-hackers
BTW, the cpluspluscheck script invokes g++ with -fno-operator-names, saying # -fno-operator-names omits the definition of bitand and bitor, which # collide with varbit.h. Could be fixed, if one were so inclined. I just confirmed that those two function definitions are the only issues that currently show up if one removes the switch. Now, I'm not that concerned about whether C++ users can include varbit.h ... but if we're really going to use this technique to check whether C++ can include headers, I think we've got to get rid of that switch, or we'll get bitten elsewhere. I propose renaming bitand() and bitor() to bit_and and bit_or() ... any objections? regards, tom lane