Re: C++ keywords in headers (was Re: [GENERAL] #include ) - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: C++ keywords in headers (was Re: [GENERAL] #include )
Date
Msg-id AANLkTi=UPNXk+iYnSQjyu2mu5eTznmKzv88WhLXfrbG0@mail.gmail.com
Whole thread Raw
In response to Re: C++ keywords in headers (was Re: [GENERAL] #include )  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 27 December 2010 19:17, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> [ shrug... ]  If it's not a keyword according to popularly available
> tools, then I really have zero interest in worrying about it.  This
> is an exercise in making the headers useful in practice, not in academic
> standards conformance.

It isn't academic and I'm not just being pedantic, because the
standard introduces many new, useful features. A lot of popular C++
libraries optionally use C++0x through the use of conditional
compilation. For example, my distro's libstdc++ standard library
(which is mostly header-based due to the fact that it is mostly
comprised of templates and inline functions) has many #ifdefs, so that
things like move constructors (a big performance win for standard
library containers) are available. It just seems prudent to assume
that if any of these pg headers are being included in C++ TUs, they
might well be using C++0x.

--
Regards,
Peter Geoghegan


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: C++ keywords in headers (was Re: [GENERAL] #include )
Next
From: Simon Riggs
Date:
Subject: Re: Reduce lock levels for ADD and DROP COLUMN